1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
3 // This is a long test that checks that the aliases created by weakref are
4 // never in the symbol table and that the only case it causes a symbol to
5 // be output as a weak undefined symbol is if that variable is not defined
6 // in this file and all the references to it are done via the alias.
73 // CHECK-NEXT: Symbol {
74 // CHECK-NEXT: Name: (0)
75 // CHECK-NEXT: Value: 0x0
76 // CHECK-NEXT: Size: 0
77 // CHECK-NEXT: Binding: Local (0x0)
78 // CHECK-NEXT: Type: None (0x0)
79 // CHECK-NEXT: Other: 0
80 // CHECK-NEXT: Section: Undefined (0x0)
82 // CHECK-NEXT: Symbol {
83 // CHECK-NEXT: Name: bar6
84 // CHECK-NEXT: Value: 0x18
85 // CHECK-NEXT: Size: 0
86 // CHECK-NEXT: Binding: Local
87 // CHECK-NEXT: Type: None
88 // CHECK-NEXT: Other: 0
89 // CHECK-NEXT: Section: .text
91 // CHECK-NEXT: Symbol {
92 // CHECK-NEXT: Name: bar7
93 // CHECK-NEXT: Value: 0x18
94 // CHECK-NEXT: Size: 0
95 // CHECK-NEXT: Binding: Local
96 // CHECK-NEXT: Type: None
97 // CHECK-NEXT: Other: 0
98 // CHECK-NEXT: Section: .text
100 // CHECK-NEXT: Symbol {
101 // CHECK-NEXT: Name: bar8
102 // CHECK-NEXT: Value: 0x1C
103 // CHECK-NEXT: Size: 0
104 // CHECK-NEXT: Binding: Local
105 // CHECK-NEXT: Type: None
106 // CHECK-NEXT: Other: 0
107 // CHECK-NEXT: Section: .text
109 // CHECK-NEXT: Symbol {
110 // CHECK-NEXT: Name: bar9
111 // CHECK-NEXT: Value: 0x20
112 // CHECK-NEXT: Size: 0
113 // CHECK-NEXT: Binding: Local
114 // CHECK-NEXT: Type: None
115 // CHECK-NEXT: Other: 0
116 // CHECK-NEXT: Section: .text
118 // CHECK-NEXT: Symbol {
119 // CHECK-NEXT: Name: (0)
120 // CHECK-NEXT: Value: 0x0
121 // CHECK-NEXT: Size: 0
122 // CHECK-NEXT: Binding: Local
123 // CHECK-NEXT: Type: Section
124 // CHECK-NEXT: Other: 0
125 // CHECK-NEXT: Section: .text
127 // CHECK-NEXT: Symbol {
128 // CHECK-NEXT: Name: bar10
129 // CHECK-NEXT: Value: 0x28
130 // CHECK-NEXT: Size: 0
131 // CHECK-NEXT: Binding: Global
132 // CHECK-NEXT: Type: None
133 // CHECK-NEXT: Other: 0
134 // CHECK-NEXT: Section: .text
136 // CHECK-NEXT: Symbol {
137 // CHECK-NEXT: Name: bar11
138 // CHECK-NEXT: Value: 0x30
139 // CHECK-NEXT: Size: 0
140 // CHECK-NEXT: Binding: Global
141 // CHECK-NEXT: Type: None
142 // CHECK-NEXT: Other: 0
143 // CHECK-NEXT: Section: .text
145 // CHECK-NEXT: Symbol {
146 // CHECK-NEXT: Name: bar12
147 // CHECK-NEXT: Value: 0x30
148 // CHECK-NEXT: Size: 0
149 // CHECK-NEXT: Binding: Global
150 // CHECK-NEXT: Type: None
151 // CHECK-NEXT: Other: 0
152 // CHECK-NEXT: Section: .text
154 // CHECK-NEXT: Symbol {
155 // CHECK-NEXT: Name: bar13
156 // CHECK-NEXT: Value: 0x34
157 // CHECK-NEXT: Size: 0
158 // CHECK-NEXT: Binding: Global
159 // CHECK-NEXT: Type: None
160 // CHECK-NEXT: Other: 0
161 // CHECK-NEXT: Section: .text
163 // CHECK-NEXT: Symbol {
164 // CHECK-NEXT: Name: bar14
165 // CHECK-NEXT: Value: 0x38
166 // CHECK-NEXT: Size: 0
167 // CHECK-NEXT: Binding: Global
168 // CHECK-NEXT: Type: None
169 // CHECK-NEXT: Other: 0
170 // CHECK-NEXT: Section: .text
172 // CHECK-NEXT: Symbol {
173 // CHECK-NEXT: Name: bar15
174 // CHECK-NEXT: Value: 0x40
175 // CHECK-NEXT: Size: 0
176 // CHECK-NEXT: Binding: Global
177 // CHECK-NEXT: Type: None
178 // CHECK-NEXT: Other: 0
179 // CHECK-NEXT: Section: .text
181 // CHECK-NEXT: Symbol {
182 // CHECK-NEXT: Name: bar2
183 // CHECK-NEXT: Value: 0x0
184 // CHECK-NEXT: Size: 0
185 // CHECK-NEXT: Binding: Global
186 // CHECK-NEXT: Type: None
187 // CHECK-NEXT: Other: 0
188 // CHECK-NEXT: Section: Undefined (0x0)
190 // CHECK-NEXT: Symbol {
191 // CHECK-NEXT: Name: bar3
192 // CHECK-NEXT: Value: 0x0
193 // CHECK-NEXT: Size: 0
194 // CHECK-NEXT: Binding: Weak
195 // CHECK-NEXT: Type: None
196 // CHECK-NEXT: Other: 0
197 // CHECK-NEXT: Section: Undefined (0x0)
199 // CHECK-NEXT: Symbol {
200 // CHECK-NEXT: Name: bar4
201 // CHECK-NEXT: Value: 0x0
202 // CHECK-NEXT: Size: 0
203 // CHECK-NEXT: Binding: Global
204 // CHECK-NEXT: Type: None
205 // CHECK-NEXT: Other: 0
206 // CHECK-NEXT: Section: Undefined (0x0)
208 // CHECK-NEXT: Symbol {
209 // CHECK-NEXT: Name: bar5
210 // CHECK-NEXT: Value: 0x0
211 // CHECK-NEXT: Size: 0
212 // CHECK-NEXT: Binding: Global
213 // CHECK-NEXT: Type: None
214 // CHECK-NEXT: Other: 0
215 // CHECK-NEXT: Section: Undefined (0x0)