1 // RUN
: llvm-mc
-triple
=arm64-linux-gnu
-o
- < %s | FileCheck
%s
2 // RUN
: llvm-mc
-triple
=arm64-linux-gnu
-show-encoding
-o
- < %s | \
3 // RUN
: FileCheck
--check-prefix
=CHECK-ENCODING
%s
4 // RUN
: llvm-mc
-triple
=arm64-linux-gnu
-filetype
=obj
< %s | \
5 // RUN
: llvm-objdump
--triple
=arm64-linux-gnu
- -r | \
6 // RUN
: FileCheck
%s
--check-prefix
=CHECK-OBJ-LP64
9 add x0
, x2
, #:lo12:sym+12
10 add x0
, x2
, #:lo12:sym-3
11 // CHECK
: add x0
, x2
, :lo12
:sym
12 // CHECK
: add x0
, x2
, :lo12
:sym+
12
13 // CHECK
: add x0
, x2
, :lo12
:sym-
3
14 // CHECK-OBJ-LP64
: 0 R_AARCH64_ADD_ABS_LO12_NC sym
15 // CHECK-OBJ-LP64
: 4 R_AARCH64_ADD_ABS_LO12_NC sym+
0xc
16 // CHECK-OBJ-LP64
: 8 R_AARCH64_ADD_ABS_LO12_NC sym-
0x3
18 add x5
, x7
, #:dtprel_lo12:sym
19 // CHECK
: add x5
, x7
, :dtprel_lo12
:sym
20 // CHECK-OBJ-LP64
: c R_AARCH64_TLSLD_ADD_DTPREL_LO12 sym
22 add x9
, x12
, #:dtprel_lo12_nc:sym
23 // CHECK
: add x9
, x12
, :dtprel_lo12_nc
:sym
24 // CHECK-OBJ-LP64
: 10 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC sym
26 add x20
, x30
, #:tprel_lo12:sym
27 // CHECK
: add x20
, x30
, :tprel_lo12
:sym
28 // CHECK-OBJ-LP64
: 14 R_AARCH64_TLSLE_ADD_TPREL_LO12 sym
30 add x9
, x12
, #:tprel_lo12_nc:sym
31 // CHECK
: add x9
, x12
, :tprel_lo12_nc
:sym
32 // CHECK-OBJ-LP64
: 18 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC sym
34 add x5
, x0
, #:tlsdesc_lo12:sym
35 // CHECK
: add x5
, x0
, :tlsdesc_lo12
:sym
36 // CHECK-OBJ-LP64
: 1c R_AARCH64_TLSDESC_ADD_LO12 sym
38 add x0
, x2
, #:lo12:sym+8
39 // CHECK
: add x0
, x2
, :lo12
:sym
40 // CHECK-OBJ-LP64
: 20 R_AARCH64_ADD_ABS_LO12_NC sym+
0x8
42 add x5
, x7
, #:dtprel_lo12:sym+1
43 // CHECK
: add x5
, x7
, :dtprel_lo12
:sym+
1
44 // CHECK-OBJ-LP64
: 24 R_AARCH64_TLSLD_ADD_DTPREL_LO12 sym+
0x1
46 add x9
, x12
, #:dtprel_lo12_nc:sym+2
47 // CHECK
: add x9
, x12
, :dtprel_lo12_nc
:sym+
2
48 // CHECK-OBJ-LP64
: 28 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC sym+
0x2
50 add x20
, x30
, #:tprel_lo12:sym+12
51 // CHECK
: add x20
, x30
, :tprel_lo12
:sym+
12
52 // CHECK-OBJ-LP64
: 2c R_AARCH64_TLSLE_ADD_TPREL_LO12 sym+
0xc
54 add x9
, x12
, #:tprel_lo12_nc:sym+54
55 // CHECK
: add x9
, x12
, :tprel_lo12_nc
:sym+
54
56 // CHECK-OBJ-LP64
: 30 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC sym+
0x36
58 add x5
, x0
, #:tlsdesc_lo12:sym+70
59 // CHECK
: add x5
, x0
, :tlsdesc_lo12
:sym+
70
60 // CHECK-OBJ-LP64
: 34 R_AARCH64_TLSDESC_ADD_LO12 sym+
0x46
63 // CHECK-OBJ-LP64
: 38 R_AARCH64_PREL16 sym+
0x4
65 // CHECK-OBJ-LP64
: 3a R_AARCH64_PREL32 sym+
0x8
67 // CHECK-OBJ-LP64
: 3e R_AARCH64_PREL64 sym
{{$
}}
70 // CHECK-OBJ-LP64
: 46 R_AARCH64_ABS16 sym
72 // CHECK-OBJ-LP64
: 48 R_AARCH64_ABS32 sym+
0x1
74 // CHECK-OBJ-LP64
: 4c R_AARCH64_ABS64 sym+
0x10
77 // CHECK
: adrp x0
, sym
78 // CHECK-OBJ-LP64
: 54 R_AARCH64_ADR_PREL_PG_HI21 sym
81 // CHECK
: adrp x15
, :got
:sym
82 // CHECK-OBJ-LP64
: 58 R_AARCH64_ADR_GOT_PAGE sym
84 adrp x15
, :got_auth
:sym
85 // CHECK
: adrp x15
, :got_auth
:sym
86 // CHECK-OBJ-LP64
: 5c R_AARCH64_AUTH_ADR_GOT_PAGE sym
88 adrp x29
, :gottprel
:sym
89 // CHECK
: adrp x29
, :gottprel
:sym
90 // CHECK-OBJ-LP64
: 60 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 sym
93 // CHECK
: adrp x2
, :tlsdesc
:sym
94 // CHECK-OBJ-LP64
: 64 R_AARCH64_TLSDESC_ADR_PAGE21 sym
96 // LLVM is
not competent enough to do this relocation because the
97 // page boundary could occur anywhere after linking.
A relocation
99 adrp x3
, trickQuestion
100 .global trickQuestion
102 // CHECK
: adrp x3
, trickQuestion
103 // CHECK-OBJ-LP64
: 68 R_AARCH64_ADR_PREL_PG_HI21 trickQuestion
105 ldrb w2
, [x3
, :lo12
:sym
]
106 ldrsb w5
, [x7
, #:lo12:sym]
107 ldrsb x11
, [x13
, :lo12
:sym
]
108 ldr b17
, [x19
, #:lo12:sym]
109 ldrb w2
, [x3
, :lo12
:sym+
15]
110 ldrsb w5
, [x7
, #:lo12:sym-2]
111 ldr b17
, [x19
, #:lo12:sym+4]
112 // CHECK
: ldrb w2
, [x3
, :lo12
:sym
]
113 // CHECK
: ldrsb w5
, [x7
, :lo12
:sym
]
114 // CHECK
: ldrsb x11
, [x13
, :lo12
:sym
]
115 // CHECK
: ldr b17
, [x19
, :lo12
:sym
]
116 // CHECK
: ldrb w2
, [x3
, :lo12
:sym+
15]
117 // CHECK
: ldrsb w5
, [x7
, :lo12
:sym-
2]
118 // CHECK
: ldr b17
, [x19
, :lo12
:sym+
4]
119 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym
120 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym
121 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym
122 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym
123 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym+
0xf
124 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym-
0x2
125 // CHECK-OBJ-LP64
: R_AARCH64_LDST8_ABS_LO12_NC sym+
0x4
127 ldrb w23
, [x29
, #:dtprel_lo12_nc:sym]
128 ldrsb w23
, [x19
, #:dtprel_lo12:sym]
129 ldrsb x17
, [x13
, :dtprel_lo12_nc
:sym
]
130 ldr b11
, [x7
, #:dtprel_lo12:sym]
131 ldrb w23
, [x29
, #:dtprel_lo12_nc:sym+2]
132 // CHECK
: ldrb w23
, [x29
, :dtprel_lo12_nc
:sym
]
133 // CHECK
: ldrsb w23
, [x19
, :dtprel_lo12
:sym
]
134 // CHECK
: ldrsb x17
, [x13
, :dtprel_lo12_nc
:sym
]
135 // CHECK
: ldr b11
, [x7
, :dtprel_lo12
:sym
]
136 // CHECK
: ldrb w23
, [x29
, :dtprel_lo12_nc
:sym+
2]
137 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC sym
138 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST8_DTPREL_LO12 sym
139 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC sym
140 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST8_DTPREL_LO12 sym
141 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC sym+
0x2
143 ldrb w1
, [x2
, :tprel_lo12
:sym
]
144 ldrsb w3
, [x4
, #:tprel_lo12_nc:sym]
145 ldrsb x5
, [x6
, :tprel_lo12
:sym
]
146 ldr b7
, [x8
, #:tprel_lo12_nc:sym]
147 // CHECK
: ldrb w1
, [x2
, :tprel_lo12
:sym
]
148 // CHECK
: ldrsb w3
, [x4
, :tprel_lo12_nc
:sym
]
149 // CHECK
: ldrsb x5
, [x6
, :tprel_lo12
:sym
]
150 // CHECK
: ldr b7
, [x8
, :tprel_lo12_nc
:sym
]
151 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST8_TPREL_LO12 sym
152 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC sym
153 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST8_TPREL_LO12 sym
154 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC sym
156 ldrh w2
, [x3
, #:lo12:sym]
157 ldrsh w5
, [x7
, :lo12
:sym
]
158 ldrsh x11
, [x13
, #:lo12:sym]
159 ldr h17
, [x19
, :lo12
:sym
]
160 ldrh w2
, [x3
, #:lo12:sym+4]
161 // CHECK
: ldrh w2
, [x3
, :lo12
:sym
]
162 // CHECK
: ldrsh w5
, [x7
, :lo12
:sym
]
163 // CHECK
: ldrsh x11
, [x13
, :lo12
:sym
]
164 // CHECK
: ldr h17
, [x19
, :lo12
:sym
]
165 // CHECK
: ldrh w2
, [x3
, :lo12
:sym+
4]
166 // CHECK-OBJ-LP64
: R_AARCH64_LDST16_ABS_LO12_NC sym
167 // CHECK-OBJ-LP64
: R_AARCH64_LDST16_ABS_LO12_NC sym
168 // CHECK-OBJ-LP64
: R_AARCH64_LDST16_ABS_LO12_NC sym
169 // CHECK-OBJ-LP64
: R_AARCH64_LDST16_ABS_LO12_NC sym
170 // CHECK-OBJ-LP64
: R_AARCH64_LDST16_ABS_LO12_NC sym+
0x4
172 ldrh w23
, [x29
, #:dtprel_lo12_nc:sym]
173 ldrsh w23
, [x19
, :dtprel_lo12
:sym
]
174 ldrsh x17
, [x13
, :dtprel_lo12_nc
:sym
]
175 ldr h11
, [x7
, #:dtprel_lo12:sym]
176 // CHECK
: ldrh w23
, [x29
, :dtprel_lo12_nc
:sym
]
177 // CHECK
: ldrsh w23
, [x19
, :dtprel_lo12
:sym
]
178 // CHECK
: ldrsh x17
, [x13
, :dtprel_lo12_nc
:sym
]
179 // CHECK
: ldr h11
, [x7
, :dtprel_lo12
:sym
]
180 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC sym
181 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST16_DTPREL_LO12 sym
182 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC sym
183 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST16_DTPREL_LO12 sym
185 ldrh w1
, [x2
, :tprel_lo12
:sym
]
186 ldrsh w3
, [x4
, #:tprel_lo12_nc:sym]
187 ldrsh x5
, [x6
, :tprel_lo12
:sym
]
188 ldr h7
, [x8
, #:tprel_lo12_nc:sym]
189 // CHECK
: ldrh w1
, [x2
, :tprel_lo12
:sym
]
190 // CHECK
: ldrsh w3
, [x4
, :tprel_lo12_nc
:sym
]
191 // CHECK
: ldrsh x5
, [x6
, :tprel_lo12
:sym
]
192 // CHECK
: ldr h7
, [x8
, :tprel_lo12_nc
:sym
]
193 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST16_TPREL_LO12 sym
194 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC sym
195 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST16_TPREL_LO12 sym
196 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC sym
198 ldr w1
, [x2
, #:lo12:sym]
199 ldrsw x3
, [x4
, #:lo12:sym]
200 ldr s4
, [x5
, :lo12
:sym
]
201 // CHECK
: ldr w1
, [x2
, :lo12
:sym
]
202 // CHECK
: ldrsw x3
, [x4
, :lo12
:sym
]
203 // CHECK
: ldr s4
, [x5
, :lo12
:sym
]
204 // CHECK-OBJ-LP64
: R_AARCH64_LDST32_ABS_LO12_NC sym
205 // CHECK-OBJ-LP64
: R_AARCH64_LDST32_ABS_LO12_NC sym
206 // CHECK-OBJ-LP64
: R_AARCH64_LDST32_ABS_LO12_NC sym
208 ldr w1
, [x2
, :dtprel_lo12
:sym
]
209 ldrsw x3
, [x4
, #:dtprel_lo12_nc:sym]
210 ldr s4
, [x5
, #:dtprel_lo12_nc:sym]
211 // CHECK
: ldr w1
, [x2
, :dtprel_lo12
:sym
]
212 // CHECK
: ldrsw x3
, [x4
, :dtprel_lo12_nc
:sym
]
213 // CHECK
: ldr s4
, [x5
, :dtprel_lo12_nc
:sym
]
214 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST32_DTPREL_LO12 sym
215 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC sym
216 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC sym
219 ldr w1
, [x2
, #:tprel_lo12:sym]
220 ldrsw x3
, [x4
, :tprel_lo12_nc
:sym
]
221 ldr s4
, [x5
, :tprel_lo12_nc
:sym
]
222 // CHECK
: ldr w1
, [x2
, :tprel_lo12
:sym
]
223 // CHECK
: ldrsw x3
, [x4
, :tprel_lo12_nc
:sym
]
224 // CHECK
: ldr s4
, [x5
, :tprel_lo12_nc
:sym
]
225 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST32_TPREL_LO12 sym
226 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC sym
227 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC sym
229 ldr x28
, [x27
, :lo12
:sym
]
230 ldr d26
, [x25
, #:lo12:sym]
231 ldr x28
, [x27
, :lo12
:sym+
10]
232 ldr x28
, [x27
, :lo12
:sym-
15]
233 // CHECK
: ldr x28
, [x27
, :lo12
:sym
]
234 // CHECK
: ldr d26
, [x25
, :lo12
:sym
]
235 // CHECK
: ldr x28
, [x27
, :lo12
:sym+
10]
236 // CHECK
: ldr x28
, [x27
, :lo12
:sym-
15]
237 // CHECK-OBJ-LP64
: R_AARCH64_LDST64_ABS_LO12_NC sym
238 // CHECK-OBJ-LP64
: R_AARCH64_LDST64_ABS_LO12_NC sym
239 // CHECK-OBJ-LP64
: R_AARCH64_LDST64_ABS_LO12_NC sym+
0xa
240 // CHECK-OBJ-LP64
: R_AARCH64_LDST64_ABS_LO12_NC sym-
0xf
242 ldr x24
, [x23
, #:got_lo12:sym]
243 ldr d22
, [x21
, :got_lo12
:sym
]
244 ldr x24
, [x23
, :got_lo12
:sym+
7]
245 // CHECK
: ldr x24
, [x23
, :got_lo12
:sym
]
246 // CHECK
: ldr d22
, [x21
, :got_lo12
:sym
]
247 // CHECK
: ldr x24
, [x23
, :got_lo12
:sym+
7]
248 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOT_LO12_NC sym
249 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOT_LO12_NC sym
250 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOT_LO12_NC sym+
0x7
252 ldr x24
, [x23
, #:got_auth_lo12:sym]
253 ldr d22
, [x21
, :got_auth_lo12
:sym
]
254 ldr x24
, [x23
, :got_auth_lo12
:sym+
7]
255 // CHECK
: ldr x24
, [x23
, :got_auth_lo12
:sym
]
256 // CHECK
: ldr d22
, [x21
, :got_auth_lo12
:sym
]
257 // CHECK
: ldr x24
, [x23
, :got_auth_lo12
:sym+
7]
258 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_LD64_GOT_LO12_NC sym
259 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_LD64_GOT_LO12_NC sym
260 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_LD64_GOT_LO12_NC sym+
0x7
262 ldr x24
, [x23
, #:gotpage_lo15:sym]
263 ldr d22
, [x21
, :gotpage_lo15
:sym
]
264 ldr d22
, [x23
, :gotpage_lo15
:sym+
7]
265 // CHECK
: ldr x24
, [x23
, :gotpage_lo15
:sym
]
266 // CHECK
: ldr d22
, [x21
, :gotpage_lo15
:sym
]
267 // CHECK
: ldr d22
, [x23
, :gotpage_lo15
:sym+
7]
268 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOTPAGE_LO15 sym
{{$
}}
269 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOTPAGE_LO15 sym
{{$
}}
270 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOTPAGE_LO15 sym+
0x7
272 ldr x24
, [x23
, :dtprel_lo12_nc
:sym
]
273 ldr d22
, [x21
, #:dtprel_lo12:sym]
274 // CHECK
: ldr x24
, [x23
, :dtprel_lo12_nc
:sym
]
275 // CHECK
: ldr d22
, [x21
, :dtprel_lo12
:sym
]
276 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC sym
277 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST64_DTPREL_LO12 sym
279 ldr q24
, [x23
, :dtprel_lo12_nc
:sym
]
280 ldr q22
, [x21
, #:dtprel_lo12:sym]
281 // CHECK
: ldr q24
, [x23
, :dtprel_lo12_nc
:sym
]
282 // CHECK
: ldr q22
, [x21
, :dtprel_lo12
:sym
]
283 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC sym
284 // CHECK-OBJ-LP64
: R_AARCH64_TLSLD_LDST128_DTPREL_LO12 sym
286 ldr x24
, [x23
, #:tprel_lo12:sym]
287 ldr d22
, [x21
, :tprel_lo12_nc
:sym
]
288 // CHECK
: ldr x24
, [x23
, :tprel_lo12
:sym
]
289 // CHECK
: ldr d22
, [x21
, :tprel_lo12_nc
:sym
]
290 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST64_TPREL_LO12 sym
291 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC sym
293 ldr q24
, [x23
, #:tprel_lo12:sym]
294 ldr q22
, [x21
, :tprel_lo12_nc
:sym
]
295 // CHECK
: ldr q24
, [x23
, :tprel_lo12
:sym
]
296 // CHECK
: ldr q22
, [x21
, :tprel_lo12_nc
:sym
]
297 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST128_TPREL_LO12 sym
298 // CHECK-OBJ-LP64
: R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC sym
300 ldr x24
, [x23
, :gottprel_lo12
:sym
]
301 ldr d22
, [x21
, #:gottprel_lo12:sym]
302 // CHECK
: ldr x24
, [x23
, :gottprel_lo12
:sym
]
303 // CHECK
: ldr d22
, [x21
, :gottprel_lo12
:sym
]
304 // CHECK-OBJ-LP64
: R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC sym
305 // CHECK-OBJ-LP64
: R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC sym
307 ldr x24
, [x23
, #:tlsdesc_lo12:sym]
308 ldr d22
, [x21
, :tlsdesc_lo12
:sym
]
309 // CHECK
: ldr x24
, [x23
, :tlsdesc_lo12
:sym
]
310 // CHECK
: ldr d22
, [x21
, :tlsdesc_lo12
:sym
]
311 // CHECK-OBJ-LP64
: R_AARCH64_TLSDESC_LD64_LO12 sym
312 // CHECK-OBJ-LP64
: R_AARCH64_TLSDESC_LD64_LO12 sym
314 ldr q20
, [x19
, #:lo12:sym]
315 // CHECK
: ldr q20
, [x19
, :lo12
:sym
]
316 // CHECK-OBJ-LP64
: R_AARCH64_LDST128_ABS_LO12_NC sym
317 // check encoding here
, since encoding test doesn
't belong with TLS encoding
318 // tests, as it isn't a TLS relocation.
319 // CHECK-ENCODING
: ldr q20
, [x19
, :lo12
:sym
] // encoding
: [0x74,0bAAAAAA10
,0b11AAAAAA
,0x3d]
320 // CHECK-ENCODING-NEXT
: 0, value
: :lo12
:sym
, kind
: fixup_aarch64_ldst_imm12_scale16
322 // Since relocated instructions print without
a '#', that syntax should
323 // certainly
be accepted when assembling.
324 add x3
, x5
, :lo12
:imm
325 // CHECK
: add x3
, x5
, :lo12
:imm
329 // CHECK
: ldr x24
, :got
:sym
330 // CHECK
: ldr d22
, :got
:sym
331 // CHECK-OBJ-LP64
: R_AARCH64_GOT_LD_PREL19 sym
332 // CHECK-OBJ-LP64
: R_AARCH64_GOT_LD_PREL19 sym
334 adr x24
, #:got_auth:sym
335 adr x24
, :got_auth
:sym
336 ldr x24
, #:got_auth:sym
337 ldr x24
, :got_auth
:sym
338 // CHECK
: adr x24
, :got_auth
:sym
339 // CHECK
: adr x24
, :got_auth
:sym
340 // CHECK
: ldr x24
, :got_auth
:sym
341 // CHECK
: ldr x24
, :got_auth
:sym
342 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_GOT_ADR_PREL_LO21 sym
343 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_GOT_ADR_PREL_LO21 sym
344 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_GOT_LD_PREL19 sym
345 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_GOT_LD_PREL19 sym
347 // GOT relocations referencing local symbols are
not converted to reference
348 // STT_SECTION symbols. https
://github.com
/llvm
/llvm-project
/issues
/63418
349 ldr x0
, [x0
, :got_lo12
:local0
]
350 ldr x1
, [x1
, :got_lo12
:local1
]
351 ldr x2
, [x2
, :gotpage_lo15
:local2
]
353 // CHECK
: ldr x0
, [x0
, :got_lo12
:local0
]
354 // CHECK-NEXT
: ldr x1
, [x1
, :got_lo12
:local1
]
355 // CHECK-NEXT
: ldr x2
, [x2
, :gotpage_lo15
:local2
]
356 // CHECK-NEXT
: adrp x3
, :got
:local3
357 // CHECK-OBJ-LP64
: R_AARCH64_LD64_GOT_LO12_NC local0
{{$
}}
358 // CHECK-OBJ-LP64-NEXT
: R_AARCH64_LD64_GOT_LO12_NC local1
{{$
}}
359 // CHECK-OBJ-LP64-NEXT
: R_AARCH64_LD64_GOTPAGE_LO15 local2
{{$
}}
360 // CHECK-OBJ-LP64-NEXT
: R_AARCH64_ADR_GOT_PAGE local3
{{$
}}
362 add x5
, x0
, #:tlsdesc_auth_lo12:sym
363 // CHECK
: add x5
, x0
, :tlsdesc_auth_lo12
:sym
364 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_TLSDESC_ADD_LO12 sym
366 add x5
, x0
, #:tlsdesc_auth_lo12:sym+70
367 // CHECK
: add x5
, x0
, :tlsdesc_auth_lo12
:sym+
70
368 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_TLSDESC_ADD_LO12 sym+
0x46
370 adrp x2
, :tlsdesc_auth
:sym
371 // CHECK
: adrp x2
, :tlsdesc_auth
:sym
372 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_TLSDESC_ADR_PAGE21 sym
374 ldr x24
, [x23
, #:tlsdesc_auth_lo12:sym]
375 ldr d22
, [x21
, :tlsdesc_auth_lo12
:sym
]
376 // CHECK
: ldr x24
, [x23
, :tlsdesc_auth_lo12
:sym
]
377 // CHECK
: ldr d22
, [x21
, :tlsdesc_auth_lo12
:sym
]
378 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_TLSDESC_LD64_LO12 sym
379 // CHECK-OBJ-LP64
: R_AARCH64_AUTH_TLSDESC_LD64_LO12 sym