52 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: cp %t %t13 4# RUN: llvm-strip --remove-section=.text.bar %t5# RUN: llvm-readobj --file-headers --sections --symbols %t | FileCheck %s6 7# RUN: llvm-objcopy --strip-all --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: 342 43# CHECK: Name: .text44# CHECK: Name: .shstrtab45# CHECK-NOT: Name: .text.bar46# CHECK-NOT: Name: .debug_foo47# CHECK-NOT: Name: .symtab48 49# Check that *only* foo is copied and no debugfoo or textbar50# CHECK: Symbols [51# CHECK-NEXT: ]52