1 ## Checks that the tool is able to read section groups from ELF.
3 # RUN: yaml2obj --docnum=1 %s > %t1.o
4 # RUN: llvm-readobj --elf-section-groups %t1.o | FileCheck %s -check-prefix=OBJ
5 # RUN: obj2yaml %t1.o | FileCheck %s --check-prefix YAML
9 # OBJ-NEXT: Name: .group
13 # OBJ-NEXT: Type: COMDAT (0x1)
14 # OBJ-NEXT: Signature: signature
15 # OBJ-NEXT: Section(s) in group [
16 # OBJ-NEXT: .rodata (2)
21 # YAML: - Name: .group
22 # YAML: Type: SHT_GROUP
24 # YAML: Info: signature
26 # YAML: - SectionOrType: GRP_COMDAT
27 # YAML: - SectionOrType: .rodata
41 - SectionOrType: GRP_COMDAT
42 - SectionOrType: .rodata
50 ## Check obj2yaml report an error when sh_info field of
51 ## group section contains invalid (too large) signature symbol index.
53 # RUN: yaml2obj --docnum=2 %s > %t2.o
54 # RUN: not obj2yaml %t2.o 2>&1 | FileCheck %s --check-prefix ERR
68 - SectionOrType: GRP_COMDAT
71 # ERR: Error reading file: {{.*}}2.o: unable to get symbol from section [index 2]: invalid symbol index (255)