84 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: llvm-objcopy --strip-dwo %t3# RUN: llvm-readobj --symbols -S --section-groups %t | \4# RUN: FileCheck %s --implicit-check-not=.debug_5 6## `llvm-objcopy --strip-dwo` strips out dwo sections, as a result, the index of7## the symbol table, the indices of the symbols and the indices of the sections8## which go after the removed ones will change. Consequently, the fields Link,9## Info and the content of .group need to be updated.10 11## Note. 'Signature' is generated using 'Link' and 'Info', so checking it12## validates updating these fields.13 14# CHECK: Groups {15# CHECK-NEXT: Group {16# CHECK-NEXT: Name: .group17# CHECK-NEXT: Index:18# CHECK-NEXT: Link:19# CHECK-NEXT: Info:20# CHECK-NEXT: Type:21# CHECK-NEXT: Signature: group122# CHECK-NEXT: Section(s) in group [23# CHECK-NEXT: .text.group124# CHECK-NEXT: ]25 26# CHECK: Name: .group27# CHECK-NEXT: Index:28# CHECK-NEXT: Link:29# CHECK-NEXT: Info:30# CHECK-NEXT: Type:31# CHECK-NEXT: Signature: group232# CHECK-NEXT: Section(s) in group [33# CHECK-NEXT: .text.group234# CHECK-NEXT: .rela.text.group235# CHECK-NEXT: ]36 37--- !ELF38FileHeader:39 Class: ELFCLASS6440 Data: ELFDATA2LSB41 Type: ET_REL42 Machine: EM_X86_6443Sections:44 - Name: .debug_before.dwo45 Type: SHT_PROGBITS46 - Name: .group47 Type: SHT_GROUP48 Link: .symtab49 Info: group150 Members:51 - SectionOrType: GRP_COMDAT52 - SectionOrType: .text.group153 - Name: .text.group154 Type: SHT_PROGBITS55 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]56 - Name: '.group (1)'57 Type: SHT_GROUP58 Link: .symtab59 Info: group260 Members:61 - SectionOrType: GRP_COMDAT62 - SectionOrType: .text.group263 - SectionOrType: .rela.text.group264 - Name: .text.group265 Type: SHT_PROGBITS66 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]67 - Name: .rela.text.group268 Type: SHT_RELA69 Flags: [ SHF_GROUP ]70 Info: .text.group271 - Name: .debug_after.dwo72 Type: SHT_PROGBITS73Symbols:74 - Name: debug_before75 Section: .debug_before.dwo76 - Name: debug_after77 Section: .debug_after.dwo78 - Name: group279 Section: .text.group280 Binding: STB_WEAK81 - Name: group182 Section: .text.group183 Binding: STB_WEAK84