1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --strip-dwo %t
3 # RUN: llvm-readobj --symbols -S --section-groups %t | \
4 # RUN: FileCheck %s --implicit-check-not=.debug_
6 ## `llvm-objcopy --strip-dwo` strips out dwo sections, as a result, the index of
7 ## the symbol table, the indices of the symbols and the indices of the sections
8 ## which go after the removed ones will change. Consequently, the fields Link,
9 ## Info and the content of .group need to be updated.
11 ## Note. 'Signature' is generated using 'Link' and 'Info', so checking it
12 ## validates updating these fields.
16 # CHECK-NEXT: Name: .group
21 # CHECK-NEXT: Signature: group1
22 # CHECK-NEXT: Section(s) in group [
23 # CHECK-NEXT: .text.group1
31 # CHECK-NEXT: Signature: group2
32 # CHECK-NEXT: Section(s) in group [
33 # CHECK-NEXT: .text.group2
34 # CHECK-NEXT: .rela.text.group2
44 - Name: .debug_before.dwo
51 - SectionOrType: GRP_COMDAT
52 - SectionOrType: .text.group1
55 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
61 - SectionOrType: GRP_COMDAT
62 - SectionOrType: .text.group2
63 - SectionOrType: .rela.text.group2
66 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
67 - Name: .rela.text.group2
71 - Name: .debug_after.dwo
75 Section: .debug_before.dwo
77 Section: .debug_after.dwo