blob: 2387c75494f805c90ca12c45c56beca6d452cb1b [file] [log] [blame]
Shankar Easwaran58721742015-02-21 04:28:26 +00001# Checks that the tool is able to read section groups with ELF.
2RUN: obj2yaml %p/Inputs/sectionGroup.elf.x86-64 > %t1.sectiongroup.yaml
3RUN: FileCheck %s --check-prefix ELF-GROUP < %t1.sectiongroup.yaml
Chris Bieneman9cf90e62016-06-27 19:53:53 +00004RUN: yaml2obj %t1.sectiongroup.yaml -o %t2.o.elf
Shankar Easwaran58721742015-02-21 04:28:26 +00005RUN: llvm-readobj -sections %t2.o.elf | FileCheck %s -check-prefix=SECTIONS
6#ELF-GROUP: - Name: .group
7#ELF-GROUP: Type: SHT_GROUP
8#ELF-GROUP: Link: .symtab
9#ELF-GROUP: Info: a
10#ELF-GROUP: Members:
11#ELF-GROUP: - SectionOrType: GRP_COMDAT
12#ELF-GROUP: - SectionOrType: .rodata.a
13#SECTIONS: Format: ELF64-x86-64
14#SECTIONS: Arch: x86_64
15#SECTIONS: AddressSize: 64bit
16#SECTIONS: Section {
17#SECTIONS: Index: 1
18#SECTIONS: Name: .group (21)
19#SECTIONS: Type: SHT_GROUP (0x11)
20#SECTIONS: Flags [ (0x0)
21#SECTIONS: ]
22#SECTIONS: Address: 0x0
23#SECTIONS: Size: 8
24#SECTIONS: AddressAlignment: 4
25#SECTIONS: EntrySize: 4
26#SECTIONS: }