1 # RUN: yaml2obj %s -o %t
3 # RUN: llvm-objcopy --discard-locals %t %t2
4 # Verify that llvm-objcopy has not modified the input.
6 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
8 # RUN: llvm-objcopy -X %t %t3
9 # Verify that llvm-objcopy has not modified the input.
13 # Verify that llvm-strip modifies the symbol table the same way.
16 # RUN: llvm-strip --discard-locals %t4
20 # RUN: llvm-strip -X %t5
32 - Name: .LLVM.Custom.Section
38 - Name: .L.LocalSection
42 Section: .LLVM.Custom.Section
57 # CHECK-NEXT: Symbol {
59 # CHECK-NEXT: Value: 0x0
61 # CHECK-NEXT: Binding: Local
62 # CHECK-NEXT: Type: None
63 # CHECK-NEXT: Other: 0
64 # CHECK-NEXT: Section: Undefined
66 # CHECK-NEXT: Symbol {
67 # CHECK-NEXT: Name: Local
70 # CHECK-NEXT: Binding: Local
71 # CHECK-NEXT: Type: Function
73 # CHECK-NEXT: Section: .text
75 # CHECK-NEXT: Symbol {
76 # CHECK-NEXT: Name: .L.LocalSection
79 # CHECK-NEXT: Binding: Local
80 # CHECK-NEXT: Type: Section
82 # CHECK-NEXT: Section: .text
84 # CHECK-NEXT: Symbol {
88 # CHECK-NEXT: Binding: Local
89 # CHECK-NEXT: Type: Section
91 # CHECK-NEXT: Section: .LLVM.Custom.Section
93 # CHECK-NEXT: Symbol {
94 # CHECK-NEXT: Name: .L.LocalFile
97 # CHECK-NEXT: Binding: Local
98 # CHECK-NEXT: Type: File
100 # CHECK-NEXT: Section: Undefined
102 # CHECK-NEXT: Symbol {
103 # CHECK-NEXT: Name: .L.undefined
106 # CHECK-NEXT: Binding: Local
107 # CHECK-NEXT: Type: None
109 # CHECK-NEXT: Section: Undefined
111 # CHECK-NEXT: Symbol {
112 # CHECK-NEXT: Name: .L.Global
115 # CHECK-NEXT: Binding: Global
116 # CHECK-NEXT: Type: Function
118 # CHECK-NEXT: Section: .text