1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/Object/obj2yaml-sectiongroup.test
Fangrui Song b2d3b0af04 [llvm-readobj] Change -long-option to --long-option in tests. NFC
We use both -long-option and --long-option in tests. Switch to --long-option for consistency.

In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf.

While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf).

llvm-svn: 359649
2019-05-01 05:27:20 +00:00

27 lines
980 B
Plaintext

# Checks that the tool is able to read section groups with ELF.
RUN: obj2yaml %p/Inputs/sectionGroup.elf.x86-64 > %t1.sectiongroup.yaml
RUN: FileCheck %s --check-prefix ELF-GROUP < %t1.sectiongroup.yaml
RUN: yaml2obj %t1.sectiongroup.yaml -o %t2.o.elf
RUN: llvm-readobj --sections %t2.o.elf | FileCheck %s -check-prefix=SECTIONS
#ELF-GROUP: - Name: .group
#ELF-GROUP: Type: SHT_GROUP
#ELF-GROUP: Link: .symtab
#ELF-GROUP: Info: a
#ELF-GROUP: Members:
#ELF-GROUP: - SectionOrType: GRP_COMDAT
#ELF-GROUP: - SectionOrType: .rodata.a
#SECTIONS: Format: ELF64-x86-64
#SECTIONS: Arch: x86_64
#SECTIONS: AddressSize: 64bit
#SECTIONS: Section {
#SECTIONS: Index: 1
#SECTIONS: Name: .group (21)
#SECTIONS: Type: SHT_GROUP (0x11)
#SECTIONS: Flags [ (0x0)
#SECTIONS: ]
#SECTIONS: Address: 0x0
#SECTIONS: Size: 8
#SECTIONS: AddressAlignment: 4
#SECTIONS: EntrySize: 4
#SECTIONS: }