brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · f33af0b 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, as a result, 6# the indices of the sections which go after .text.bar will change, 7# thus the fields Link, Info and the content of .group should be updated.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:            ELFDATA2MSB21  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.bar33    Type:            SHT_PROGBITS34    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]35    AddressAlign:    0x000000000000001036  - Name:            .text.foo37    Type:            SHT_PROGBITS38    Flags:           [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]39    AddressAlign:    0x000000000000001040Symbols:41  - Name:            .text.bar42    Type:            STT_SECTION43    Section:         .text.bar44  - Name:            .text.foo45    Type:            STT_SECTION46    Section:         .text.foo47  - Name:            bar48    Type:            STT_FUNC49    Section:         .text.bar50    Size:            0x000000000000000051    Binding:         STB_WEAK52  - Name:            foo53    Type:            STT_FUNC54    Section:         .text.foo55    Size:            0x000000000000000056    Binding:         STB_WEAK57