1# RUN: yaml2obj %s -o %t 2# RUN: llvm-objcopy --strip-symbol baz -N bar %t %t2 3# RUN: llvm-readobj --symbols --sections %t2 | FileCheck %s 4# RUN: llvm-strip --strip-symbol baz -N bar %t -o %t3 5# RUN: cmp %t2 %t3 6# RUN: llvm-strip --regex --strip-symbol '^b.*' -N bar %t -o %t4 7# RUN: cmp %t3 %t4 8# RUN: echo " bar # bar" > %t-list.txt 9# RUN: echo " baz # baz" >> %t-list.txt 10# RUN: echo " # no symbol" >> %t-list.txt 11# RUN: llvm-objcopy --strip-symbols %t-list.txt %t %t5 12# RUN: cmp %t3 %t5 13# RUN: echo "b.* # bar & baz" > %t-list2.txt 14# RUN: llvm-objcopy --regex --strip-symbols %t-list2.txt %t %t6 15# RUN: cmp %t3 %t6 16 17!ELF 18FileHeader: 19 Class: ELFCLASS64 20 Data: ELFDATA2LSB 21 Type: ET_REL 22 Machine: EM_X86_64 23Sections: 24 - Name: .text 25 Type: SHT_PROGBITS 26 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 27 Address: 0x1000 28 AddressAlign: 0x0000000000000010 29 Size: 64 30Symbols: 31 - Name: foo 32 Type: STT_FUNC 33 Section: .text 34 Value: 0x1000 35 Size: 8 36 - Name: bar 37 Type: STT_FUNC 38 Size: 8 39 Section: .text 40 Value: 0x1008 41 Binding: STB_WEAK 42 - Name: baz 43 Type: STT_FUNC 44 Size: 8 45 Section: .text 46 Value: 0x1010 47 Binding: STB_GLOBAL 48 49#CHECK: Symbols [ 50#CHECK-NEXT: Symbol { 51#CHECK-NEXT: Name: 52#CHECK-NEXT: Value: 0x0 53#CHECK-NEXT: Size: 0 54#CHECK-NEXT: Binding: Local 55#CHECK-NEXT: Type: None 56#CHECK-NEXT: Other: 0 57#CHECK-NEXT: Section: Undefined 58#CHECK-NEXT: } 59#CHECK-NEXT: Symbol { 60#CHECK-NEXT: Name: foo 61#CHECK-NEXT: Value: 0x1000 62#CHECK-NEXT: Size: 8 63#CHECK-NEXT: Binding: Local 64#CHECK-NEXT: Type: Function 65#CHECK-NEXT: Other: 0 66#CHECK-NEXT: Section: .text 67#CHECK-NEXT: } 68#CHECK-NEXT:] 69