1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --localize-hidden %t %t2
3 # RUN: llvm-readobj --relocations --symbols %t2 | FileCheck %s
14 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
16 AddressAlign: 0x0000000000000010
22 AddressAlign: 0x0000000000000010
23 Content: "0000000000000000"
51 - Name: hiddenGlobalCommon
62 - Name: internalGlobal
67 Other: [ STV_INTERNAL ]
69 - Name: protectedGlobal
74 Other: [ STV_PROTECTED ]
85 #CHECK-NEXT: Section (3) .rel.text {
86 #CHECK-NEXT: 0x1000 R_X86_64_PC32 undefGlobal
94 #CHECK-NEXT: Value: 0x0
96 #CHECK-NEXT: Binding: Local
97 #CHECK-NEXT: Type: None
99 #CHECK-NEXT: Section: Undefined
101 #CHECK-NEXT: Symbol {
102 #CHECK-NEXT: Name: hiddenLocal
103 #CHECK-NEXT: Value: 0x1008
105 #CHECK-NEXT: Binding: Local
106 #CHECK-NEXT: Type: Function
108 #CHECK-NEXT: STV_HIDDEN
110 #CHECK-NEXT: Section: .text
112 #CHECK-NEXT: Symbol {
113 #CHECK-NEXT: Name: hiddenGlobal
114 #CHECK-NEXT: Value: 0x2006
116 #CHECK-NEXT: Binding: Local
117 #CHECK-NEXT: Type: Object
119 #CHECK-NEXT: STV_HIDDEN
121 #CHECK-NEXT: Section: .data
123 #CHECK-NEXT: Symbol {
124 #CHECK-NEXT: Name: internalGlobal
125 #CHECK-NEXT: Value: 0x2002
127 #CHECK-NEXT: Binding: Local
128 #CHECK-NEXT: Type: Object
130 #CHECK-NEXT: STV_INTERNAL
132 #CHECK-NEXT: Section: .data
134 #CHECK-NEXT: Symbol {
135 #CHECK-NEXT: Name: hiddenWeak
136 #CHECK-NEXT: Value: 0x1010
138 #CHECK-NEXT: Binding: Local
139 #CHECK-NEXT: Type: Function
141 #CHECK-NEXT: STV_HIDDEN
143 #CHECK-NEXT: Section: .text
145 #CHECK-NEXT: Symbol {
146 #CHECK-NEXT: Name: defaultGlobal
147 #CHECK-NEXT: Value: 0x1000
149 #CHECK-NEXT: Binding: Global
150 #CHECK-NEXT: Type: Function
151 #CHECK-NEXT: Other: 0
152 #CHECK-NEXT: Section: .text
154 #CHECK-NEXT: Symbol {
155 #CHECK-NEXT: Name: hiddenGlobalCommon
156 #CHECK-NEXT: Value: 0x2006
158 #CHECK-NEXT: Binding: Global
159 #CHECK-NEXT: Type: Object
161 #CHECK-NEXT: STV_HIDDEN
163 #CHECK-NEXT: Section: Common (0xF
165 #CHECK-NEXT: Symbol {
166 #CHECK-NEXT: Name: undefGlobal
167 #CHECK-NEXT: Value: 0x0
169 #CHECK-NEXT: Binding: Global
170 #CHECK-NEXT: Type: Function
171 #CHECK-NEXT: Other: 0
172 #CHECK-NEXT: Section:
174 #CHECK-NEXT: Symbol {
175 #CHECK-NEXT: Name: protectedGlobal
176 #CHECK-NEXT: Value: 0x2000
178 #CHECK-NEXT: Binding: Global
179 #CHECK-NEXT: Type: Object
181 #CHECK-NEXT: STV_PROTECTED
183 #CHECK-NEXT: Section: .data