brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · ed782a1 Raw
71 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: cp %t %t13 4# RUN: llvm-strip --strip-debug --remove-section=.text.bar %t5# RUN: llvm-readobj --file-headers --sections --symbols %t | FileCheck %s6 7# RUN: llvm-objcopy --strip-debug --remove-section=.text.bar %t1 %t18# RUN: cmp %t %t19 10!ELF11FileHeader:12  Class:           ELFCLASS6413  Data:            ELFDATA2LSB14  Type:            ET_REL15  Machine:         EM_X86_6416Sections:17  - Name:            .debug_foo18    Type:            SHT_PROGBITS19    Content:         "00000000"20  - Name:            .text21    Type:            SHT_PROGBITS22    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]23    AddressAlign:    0x000000000000001024    Content:         "00000000"25  - Name:            .text.bar26    Type:            SHT_PROGBITS27    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]28    AddressAlign:    0x000000000000001029    Content:         "00000000"30Symbols:31  - Name:    debugfoo32    Section: .debug_foo33    Binding:  STB_GLOBAL34  - Name:    foo35    Section: .text36    Binding:  STB_GLOBAL37  - Name:    bar38    Section: .text.bar39    Binding:  STB_GLOBAL40 41# CHECK: SectionHeaderCount: 542 43# CHECK:     Name: .text44# CHECK:     Name: .symtab45# CHECK:     Name: .strtab46# CHECK:     Name: .shstrtab47# CHECK-NOT: Name: .text.bar48# CHECK-NOT: Name: .debug_foo49 50# Check that *only* foo is copied and no debugfoo or textbar51# CHECK:      Symbols [52# CHECK-NEXT:   Symbol {53# CHECK-NEXT:     Name:54# CHECK-NEXT:     Value:55# CHECK-NEXT:     Size:56# CHECK-NEXT:     Binding:57# CHECK-NEXT:     Type:58# CHECK-NEXT:     Other:59# CHECK-NEXT:     Section: Undefined60# CHECK-NEXT:   }61# CHECK-NEXT:   Symbol {62# CHECK-NEXT:     Name: foo63# CHECK-NEXT:     Value:64# CHECK-NEXT:     Size:65# CHECK-NEXT:     Binding: Global66# CHECK-NEXT:     Type:67# CHECK-NEXT:     Other:68# CHECK-NEXT:     Section: .text69# CHECK-NEXT:   }70# CHECK-NEXT: ]71