brintos

brintos / llvm-project-archived public Read only

0
0
Text · 836 B · 6bc5300 Raw
30 lines · plain
1## Verifies that running with --strip-unneeded removes debugging sections but2## retains the .gnu_debuglink section.3 4# RUN: yaml2obj %s -o %t.o5# RUN: touch %t.debug6# RUN: llvm-objcopy --add-gnu-debuglink=%t.debug %t.o %t.2.o7# RUN: llvm-strip --strip-unneeded %t.2.o -o %t.3.o8# RUN: llvm-readelf --sections %t.3.o | FileCheck %s9 10!ELF11FileHeader:12  Class:           ELFCLASS6413  Data:            ELFDATA2LSB14  Type:            ET_REL15  Machine:         EM_X86_6416Sections:17  - Name:            .text18    Type:            SHT_PROGBITS19    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]20  - Name:            .debugfoo21    Type:            SHT_PROGBITS22 23# CHECK: There are 5 section headers24 25# CHECK:        [ 0]26# CHECK-NEXT:   [ 1] .text27# CHECK-NEXT:   [ 2] .strtab28# CHECK-NEXT:   [ 3] .shstrtab29# CHECK-NEXT:   [ 4] .gnu_debuglink30