brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · c82423c Raw
57 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: llvm-objcopy --remove-section=.text.bar %t %t23# RUN: llvm-readobj --section-groups %t2 | FileCheck %s4 5# In this test the section .text.bar is getting removed, since this section6# goes after all the sections comprising a group, the content of the7# section .group doesn't change.8 9# CHECK:           Name: .group10# CHECK-NEXT:      Index: 111# CHECK-NEXT:      Link: 312# CHECK-NEXT:      Info: 213# CHECK-NEXT:      Type: COMDAT (0x1)14# CHECK-NEXT:      Signature: foo15# CHECK:           .text.foo (2)16 17--- !ELF18FileHeader:      19  Class:           ELFCLASS6420  Data:            ELFDATA2LSB21  Type:            ET_REL22  Machine:         EM_X86_6423Sections:        24  - Name:            .group25    Type:            SHT_GROUP26    Link:            .symtab27    AddressAlign:    0x000000000000000428    Info:            foo29    Members:         30      - SectionOrType:   GRP_COMDAT31      - SectionOrType:   .text.foo32  - Name:            .text.foo33    Type:            SHT_PROGBITS34    Flags:           [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]35    AddressAlign:    0x000000000000001036  - Name:            .text.bar37    Type:            SHT_PROGBITS38    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]39    AddressAlign:    0x000000000000001040Symbols:41  - Name:            .text.foo42    Type:            STT_SECTION43    Section:         .text.foo44  - Name:            .text.bar45    Type:            STT_SECTION46    Section:         .text.bar47  - Name:            foo48    Type:            STT_FUNC49    Section:         .text.foo50    Size:            0x000000000000000051    Binding:         STB_WEAK52  - Name:            bar53    Type:            STT_FUNC54    Section:         .text.bar55    Size:            0x000000000000000056    Binding:         STB_WEAK57