1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objcopy --discard-all -K foo --keep-symbol bar %t %t2
3 # RUN: llvm-objcopy -K foo -N foo -N bar --keep-symbol bar -N baz %t %t3
4 # RUN: llvm-objcopy --discard-all --regex -K '^ba.*' %t %t4
5 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
6 # RUN: llvm-readobj --symbols %t3 | FileCheck %s
7 # RUN: llvm-readobj --symbols %t4 | FileCheck %s --check-prefix=REGEX
9 # RUN: echo 'foo' > %t.symbols
10 # RUN: echo 'bar' >> %t.symbols
11 # RUN: llvm-objcopy --discard-all --keep-symbols %t.symbols %t %t5
12 # RUN: llvm-objcopy -K foo -N foo -N bar --keep-symbols %t.symbols -N baz %t %t6
13 # RUN: llvm-readobj --symbols %t5 | FileCheck %s
14 # RUN: llvm-readobj --symbols %t6 | FileCheck %s
25 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
27 AddressAlign: 0x0000000000000010
49 #CHECK-NEXT: Value: 0x0
51 #CHECK-NEXT: Binding: Local
52 #CHECK-NEXT: Type: None
54 #CHECK-NEXT: Section: Undefined
57 #CHECK-NEXT: Name: foo
58 #CHECK-NEXT: Value: 0x1000
60 #CHECK-NEXT: Binding: Local
61 #CHECK-NEXT: Type: Function
63 #CHECK-NEXT: Section: .text
66 #CHECK-NEXT: Name: bar
67 #CHECK-NEXT: Value: 0x1008
69 #CHECK-NEXT: Binding: Local
70 #CHECK-NEXT: Type: Function
72 #CHECK-NEXT: Section: .text