1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --strip-dwo %t
3 # RUN: llvm-readobj --symbols -S --elf-section-groups %t | FileCheck %s
5 ## `llvm-objcopy --strip-dwo` strips out dwo sections, as a result, the index of
6 ## the symbol table, the indices of the symbols and the indices of the sections
7 ## which go after the removed ones will change. Consequently, the fields
8 ## Link, Info and the content of .group need to be updated.
14 # CHECK-NEXT: Name: .group (1)
15 # CHECK-NEXT: Index: 1{{$}}
18 # CHECK-NEXT: Type: COMDAT (0x1)
19 # CHECK-NEXT: Signature: group1
20 # CHECK-NEXT: Section(s) in group [
21 # CHECK-NEXT: .text.group1 (3)
26 # CHECK: Name: .group (1)
27 # CHECK-NEXT: Index: 2{{$}}
30 # CHECK-NEXT: Type: COMDAT (0x1)
31 # CHECK-NEXT: Signature: group2
32 # CHECK-NEXT: Section(s) in group [
33 # CHECK-NEXT: .text.group2 (4)
34 # CHECK-NEXT: .rela.text.group2 (5)
46 - Name: .debug_before.dwo
53 - SectionOrType: GRP_COMDAT
54 - SectionOrType: .text.group1
57 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
63 - SectionOrType: GRP_COMDAT
64 - SectionOrType: .text.group2
65 - SectionOrType: .rela.text.group2
68 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
69 - Name: .rela.text.group2
73 - Name: .debug_after.dwo
77 Section: .debug_before.dwo
83 Section: .debug_after.dwo