1 # RUN: yaml2obj %s > %t 2 # RUN: cp %t %t1 3 4 # RUN: llvm-strip -remove-section=.text.bar %t 5 # RUN: llvm-readobj -file-headers -sections -symbols %t | FileCheck %s 6 7 # RUN: llvm-objcopy -strip-all -remove-section=.text.bar %t1 %t1 8 # RUN: cmp %t %t1 9 10 !ELF 11 FileHeader: 12 Class: ELFCLASS64 13 Data: ELFDATA2LSB 14 Type: ET_REL 15 Machine: EM_X86_64 16 Sections: 17 - Name: .debug_foo 18 Type: SHT_PROGBITS 19 Content: "00000000" 20 - Name: .text 21 Type: SHT_PROGBITS 22 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 23 AddressAlign: 0x0000000000000010 24 Content: "00000000" 25 - Name: .text.bar 26 Type: SHT_PROGBITS 27 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 28 AddressAlign: 0x0000000000000010 29 Content: "00000000" 30 Symbols: 31 Global: 32 - Name: debugfoo 33 Section: .debug_foo 34 - Name: foo 35 Section: .text 36 - Name: bar 37 Section: .text.bar 38 39 # CHECK: SectionHeaderCount: 3 40 41 # CHECK: Name: .text 42 # CHECK: Name: .shstrtab 43 # CHECK-NOT: Name: .text.bar 44 # CHECK-NOT: Name: .debug_foo 45 # CHECK-NOT: Name: .symtab 46 47 # Check that *only* foo is copied and no debugfoo or textbar 48 # CHECK: Symbols [ 49 # CHECK-NEXT: ] 50