1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --strip-all --keep-file-symbols %t %t2
3 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIPALL
4 # RUN: llvm-objcopy --keep-file-symbols --strip-symbol foo %t %t2
5 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIP
7 # RUN: llvm-strip --keep-file-symbols %t -o %t3
8 # RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=STRIPALL
9 # RUN: llvm-strip --keep-file-symbols --strip-symbol foo %t -o %t4
10 # RUN: llvm-readobj --symbols %t4 | FileCheck %s --check-prefix=STRIP
12 # RUN: llvm-objcopy --keep-file-symbols --strip-debug %t %t5
13 # RUN: llvm-readobj --symbols %t5 | FileCheck %s --check-prefix=STRIPDEBUG
14 # RUN: llvm-objcopy --keep-file-symbols --strip-unneeded %t %t6
15 # RUN: llvm-readobj --symbols %t6 | FileCheck %s --check-prefix=STRIPDEBUG
17 # RUN: llvm-strip --keep-file-symbols --strip-debug %t -o %t7
18 # RUN: llvm-readobj --symbols %t7 | FileCheck %s --check-prefix=STRIPDEBUG
19 # RUN: llvm-strip --keep-file-symbols --strip-unneeded %t -o %t8
20 # RUN: llvm-readobj --symbols %t8 | FileCheck %s --check-prefix=STRIPDEBUG
34 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
36 AddressAlign: 0x0000000000000010
51 #STRIPALL-NEXT: Symbol {
53 #STRIPALL-NEXT: Value: 0x0
54 #STRIPALL-NEXT: Size: 0
55 #STRIPALL-NEXT: Binding: Local
56 #STRIPALL-NEXT: Type: None
57 #STRIPALL-NEXT: Other: 0
58 #STRIPALL-NEXT: Section: Undefined
60 #STRIPALL-NEXT: Symbol {
61 #STRIPALL-NEXT: Name: foo
62 #STRIPALL-NEXT: Value: 0x0
63 #STRIPALL-NEXT: Size: 0
64 #STRIPALL-NEXT: Binding: Local
65 #STRIPALL-NEXT: Type: File
66 #STRIPALL-NEXT: Other: 0
67 #STRIPALL-NEXT: Section: .text
74 #STRIP-NEXT: Value: 0x0
76 #STRIP-NEXT: Binding: Local
77 #STRIP-NEXT: Type: None
79 #STRIP-NEXT: Section: Undefined
82 #STRIP-NEXT: Name: foo
83 #STRIP-NEXT: Value: 0x0
85 #STRIP-NEXT: Binding: Local
86 #STRIP-NEXT: Type: File
88 #STRIP-NEXT: Section: .text
91 #STRIP-NEXT: Name: bar
92 #STRIP-NEXT: Value: 0x0
94 #STRIP-NEXT: Binding: Global
95 #STRIP-NEXT: Type: Function
97 #STRIP-NEXT: Section: .text
100 #STRIP-NEXT: Name: debugfoo
101 #STRIP-NEXT: Value: 0x0
103 #STRIP-NEXT: Binding: Global
104 #STRIP-NEXT: Type: None
105 #STRIP-NEXT: Other: 0
106 #STRIP-NEXT: Section: .debugfoo
110 #STRIPDEBUG: Symbols [
111 #STRIPDEBUG-NEXT: Symbol {
112 #STRIPDEBUG-NEXT: Name:
113 #STRIPDEBUG-NEXT: Value: 0x0
114 #STRIPDEBUG-NEXT: Size: 0
115 #STRIPDEBUG-NEXT: Binding: Local
116 #STRIPDEBUG-NEXT: Type: None
117 #STRIPDEBUG-NEXT: Other: 0
118 #STRIPDEBUG-NEXT: Section: Undefined
120 #STRIPDEBUG-NEXT: Symbol {
121 #STRIPDEBUG-NEXT: Name: foo
122 #STRIPDEBUG-NEXT: Value: 0x0
123 #STRIPDEBUG-NEXT: Size: 0
124 #STRIPDEBUG-NEXT: Binding: Local
125 #STRIPDEBUG-NEXT: Type: File
126 #STRIPDEBUG-NEXT: Other: 0
127 #STRIPDEBUG-NEXT: Section: .text
129 #STRIPDEBUG-NEXT: Symbol {
130 #STRIPDEBUG-NEXT: Name: bar
131 #STRIPDEBUG-NEXT: Value: 0x0
132 #STRIPDEBUG-NEXT: Size: 0
133 #STRIPDEBUG-NEXT: Binding: Global
134 #STRIPDEBUG-NEXT: Type: Function
135 #STRIPDEBUG-NEXT: Other: 0
136 #STRIPDEBUG-NEXT: Section: .text