xref: /aosp_15_r20/external/llvm/test/Object/obj2yaml-sectiongroup.test (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# Checks that the tool is able to read section groups with ELF.
2*9880d681SAndroid Build Coastguard WorkerRUN: obj2yaml %p/Inputs/sectionGroup.elf.x86-64 > %t1.sectiongroup.yaml
3*9880d681SAndroid Build Coastguard WorkerRUN: FileCheck %s --check-prefix ELF-GROUP < %t1.sectiongroup.yaml
4*9880d681SAndroid Build Coastguard WorkerRUN: yaml2obj %t1.sectiongroup.yaml -o %t2.o.elf
5*9880d681SAndroid Build Coastguard WorkerRUN: llvm-readobj -sections %t2.o.elf | FileCheck %s -check-prefix=SECTIONS
6*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:  - Name:            .group
7*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:    Type:            SHT_GROUP
8*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:    Link:            .symtab
9*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:    Info:            a
10*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:    Members:
11*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:      - SectionOrType:   GRP_COMDAT
12*9880d681SAndroid Build Coastguard Worker#ELF-GROUP:      - SectionOrType:   .rodata.a
13*9880d681SAndroid Build Coastguard Worker#SECTIONS: Format: ELF64-x86-64
14*9880d681SAndroid Build Coastguard Worker#SECTIONS: Arch: x86_64
15*9880d681SAndroid Build Coastguard Worker#SECTIONS: AddressSize: 64bit
16*9880d681SAndroid Build Coastguard Worker#SECTIONS:   Section {
17*9880d681SAndroid Build Coastguard Worker#SECTIONS:     Index: 1
18*9880d681SAndroid Build Coastguard Worker#SECTIONS:     Name: .group (21)
19*9880d681SAndroid Build Coastguard Worker#SECTIONS:     Type: SHT_GROUP (0x11)
20*9880d681SAndroid Build Coastguard Worker#SECTIONS:     Flags [ (0x0)
21*9880d681SAndroid Build Coastguard Worker#SECTIONS:     ]
22*9880d681SAndroid Build Coastguard Worker#SECTIONS:     Address: 0x0
23*9880d681SAndroid Build Coastguard Worker#SECTIONS:     Size: 8
24*9880d681SAndroid Build Coastguard Worker#SECTIONS:     AddressAlignment: 4
25*9880d681SAndroid Build Coastguard Worker#SECTIONS:     EntrySize: 4
26*9880d681SAndroid Build Coastguard Worker#SECTIONS:   }
27