1 /* AArch64 ELF support for BFD.
2 
3    Copyright (C) 2009-2020 Free Software Foundation, Inc.
4    Contributed by ARM Ltd.
5 
6    This file is part of GNU Binutils.
7 
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3 of the license, or
11    (at your option) any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program; see the file COPYING3. If not,
20    see <http://www.gnu.org/licenses/>.  */
21 
22 #ifndef _ELF_AARCH64_H
23 #define _ELF_AARCH64_H
24 
25 #include "elf/reloc-macros.h"
26 
27 /* Processor specific program header types.  */
28 #define PT_AARCH64_ARCHEXT	(PT_LOPROC + 0)
29 
30 /* Additional section types.  */
31 #define SHT_AARCH64_ATTRIBUTES	0x70000003  /* Section holds attributes.  */
32 
33 /* AArch64-specific values for sh_flags.  */
34 #define SHF_ENTRYSECT		0x10000000   /* Section contains an
35 						entry point.  */
36 #define SHF_COMDEF		0x80000000   /* Section may be multiply defined
37 						in the input to a link step.  */
38 /* Processor specific dynamic array tags.  */
39 #define DT_AARCH64_BTI_PLT	(DT_LOPROC + 1)
40 #define DT_AARCH64_PAC_PLT	(DT_LOPROC + 3)
41 #define DT_AARCH64_VARIANT_PCS	(DT_LOPROC + 5)
42 
43 /* AArch64-specific values for st_other.  */
44 #define STO_AARCH64_VARIANT_PCS	0x80  /* Symbol may follow different call
45 					 convention from the base PCS.  */
46 
47 /* Relocation types.  */
48 
49 START_RELOC_NUMBERS (elf_aarch64_reloc_type)
50 
51 /* Null relocations.  */
52 RELOC_NUMBER (R_AARCH64_NONE, 0) /* No reloc */
53 
54 /* Basic data relocations.  */
55 
56 /* .word:  (S+A) */
57 RELOC_NUMBER (R_AARCH64_P32_ABS32, 1)
58 
59 /* .half: (S+A) */
60 RELOC_NUMBER (R_AARCH64_P32_ABS16, 2)
61 
62 /* .word: (S+A-P) */
63 RELOC_NUMBER (R_AARCH64_P32_PREL32, 3)
64 
65 /* .half:  (S+A-P) */
66 RELOC_NUMBER (R_AARCH64_P32_PREL16, 4)
67 
68 /* Group relocations to create a 16, 32, 48 or 64 bit
69    unsigned data or abs address inline.  */
70 
71 /* MOV[ZK]:   ((S+A) >>  0) & 0xffff */
72 RELOC_NUMBER (R_AARCH64_P32_MOVW_UABS_G0, 5)
73 
74 /* MOV[ZK]:   ((S+A) >>  0) & 0xffff */
75 RELOC_NUMBER (R_AARCH64_P32_MOVW_UABS_G0_NC, 6)
76 
77 /* MOV[ZK]:   ((S+A) >> 16) & 0xffff */
78 RELOC_NUMBER (R_AARCH64_P32_MOVW_UABS_G1, 7)
79 
80 /* Group relocations to create high part of a 16, 32, 48 or 64 bit
81    signed data or abs address inline. Will change instruction
82    to MOVN or MOVZ depending on sign of calculated value.  */
83 
84 /* MOV[ZN]:   ((S+A) >>  0) & 0xffff */
85 RELOC_NUMBER (R_AARCH64_P32_MOVW_SABS_G0, 8)
86 
87 /* Relocations to generate 19, 21 and 33 bit PC-relative load/store
88    addresses: PG(x) is (x & ~0xfff).  */
89 
90 /* LD-lit: ((S+A-P) >> 2) & 0x7ffff */
91 RELOC_NUMBER (R_AARCH64_P32_LD_PREL_LO19, 9)
92 
93 /* ADR:    (S+A-P) & 0x1fffff */
94 RELOC_NUMBER (R_AARCH64_P32_ADR_PREL_LO21, 10)
95 
96 /* ADRH:   ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */
97 RELOC_NUMBER (R_AARCH64_P32_ADR_PREL_PG_HI21, 11)
98 
99 /* ADD:    (S+A) & 0xfff */
100 RELOC_NUMBER (R_AARCH64_P32_ADD_ABS_LO12_NC, 12)
101 
102 /* LD/ST8: (S+A) & 0xfff */
103 RELOC_NUMBER (R_AARCH64_P32_LDST8_ABS_LO12_NC, 13)
104 
105 /* LD/ST16: (S+A) & 0xffe */
106 RELOC_NUMBER (R_AARCH64_P32_LDST16_ABS_LO12_NC, 14)
107 
108 /* LD/ST32: (S+A) & 0xffc */
109 RELOC_NUMBER (R_AARCH64_P32_LDST32_ABS_LO12_NC, 15)
110 
111 /* LD/ST64: (S+A) & 0xff8 */
112 RELOC_NUMBER (R_AARCH64_P32_LDST64_ABS_LO12_NC, 16)
113 
114 /* LD/ST128: (S+A) & 0xff0 */
115 RELOC_NUMBER (R_AARCH64_P32_LDST128_ABS_LO12_NC, 17)
116 
117 /* Relocations for control-flow instructions.  */
118 
119 /* TBZ/NZ: ((S+A-P) >> 2) & 0x3fff.  */
120 RELOC_NUMBER (R_AARCH64_P32_TSTBR14, 18)
121 
122 /* B.cond: ((S+A-P) >> 2) & 0x7ffff.  */
123 RELOC_NUMBER (R_AARCH64_P32_CONDBR19, 19)
124 
125 /* B:      ((S+A-P) >> 2) & 0x3ffffff.  */
126 RELOC_NUMBER (R_AARCH64_P32_JUMP26, 20)
127 
128 /* BL:     ((S+A-P) >> 2) & 0x3ffffff.  */
129 RELOC_NUMBER (R_AARCH64_P32_CALL26, 21)
130 
131 /* Group relocations to create a 16 or 32 bit PC-relative offset inline.  */
132 RELOC_NUMBER (R_AARCH64_P32_MOVW_PREL_G0, 22)
133 RELOC_NUMBER (R_AARCH64_P32_MOVW_PREL_G0_NC, 23)
134 RELOC_NUMBER (R_AARCH64_P32_MOVW_PREL_G1, 24)
135 
136 RELOC_NUMBER (R_AARCH64_P32_GOT_LD_PREL19, 25)
137 RELOC_NUMBER (R_AARCH64_P32_ADR_GOT_PAGE, 26)
138 RELOC_NUMBER (R_AARCH64_P32_LD32_GOT_LO12_NC, 27)
139 RELOC_NUMBER (R_AARCH64_P32_LD32_GOTPAGE_LO14, 28)
140 
141 RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADR_PREL21, 80)
142 RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADR_PAGE21, 81)
143 RELOC_NUMBER (R_AARCH64_P32_TLSGD_ADD_LO12_NC, 82)
144 RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADR_PREL21, 83)
145 RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADR_PAGE21, 84)
146 RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_LO12_NC, 85)
147 RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G1, 87)
148 RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0, 88)
149 RELOC_NUMBER (R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0_NC, 89)
150 RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12, 90)
151 RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12, 91)
152 RELOC_NUMBER (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12_NC, 92)
153 RELOC_NUMBER (R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21, 103)
154 RELOC_NUMBER (R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC, 104)
155 RELOC_NUMBER (R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19, 105)
156 RELOC_NUMBER (R_AARCH64_P32_TLSLE_MOVW_TPREL_G1, 106)
157 RELOC_NUMBER (R_AARCH64_P32_TLSLE_MOVW_TPREL_G0, 107)
158 RELOC_NUMBER (R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC, 108)
159 RELOC_NUMBER (R_AARCH64_P32_TLSLE_ADD_TPREL_HI12, 109)
160 RELOC_NUMBER (R_AARCH64_P32_TLSLE_ADD_TPREL_LO12, 110)
161 RELOC_NUMBER (R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC, 111)
162 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12, 112)
163 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12_NC, 113)
164 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12, 114)
165 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12_NC, 115)
166 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12, 116)
167 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12_NC, 117)
168 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12, 118)
169 RELOC_NUMBER (R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12_NC, 119)
170 
171 RELOC_NUMBER (R_AARCH64_P32_TLSDESC_LD_PREL19, 122)
172 RELOC_NUMBER (R_AARCH64_P32_TLSDESC_ADR_PREL21, 123)
173 RELOC_NUMBER (R_AARCH64_P32_TLSDESC_ADR_PAGE21, 124)
174 RELOC_NUMBER (R_AARCH64_P32_TLSDESC_LD32_LO12_NC, 125)
175 RELOC_NUMBER (R_AARCH64_P32_TLSDESC_ADD_LO12_NC, 126)
176 RELOC_NUMBER (R_AARCH64_P32_TLSDESC_CALL, 127)
177 
178 /* Dynamic relocations */
179 
180 /* Copy symbol at runtime.  */
181 RELOC_NUMBER (R_AARCH64_P32_COPY, 180)
182 
183 /* Create GOT entry.  */
184 RELOC_NUMBER (R_AARCH64_P32_GLOB_DAT, 181)
185 
186  /* Create PLT entry.  */
187 RELOC_NUMBER (R_AARCH64_P32_JUMP_SLOT, 182)
188 
189 /* Adjust by program base.  */
190 RELOC_NUMBER (R_AARCH64_P32_RELATIVE, 183)
191 RELOC_NUMBER (R_AARCH64_P32_TLS_DTPMOD, 184)
192 RELOC_NUMBER (R_AARCH64_P32_TLS_DTPREL, 185)
193 RELOC_NUMBER (R_AARCH64_P32_TLS_TPREL, 186)
194 RELOC_NUMBER (R_AARCH64_P32_TLSDESC, 187)
195 RELOC_NUMBER (R_AARCH64_P32_IRELATIVE, 188)
196 
197 RELOC_NUMBER (R_AARCH64_NULL, 256) /* No reloc */
198 
199 /* Basic data relocations.  */
200 
201 /* .xword: (S+A) */
202 RELOC_NUMBER (R_AARCH64_ABS64, 257)
203 
204 /* .word:  (S+A) */
205 RELOC_NUMBER (R_AARCH64_ABS32, 258)
206 
207 /* .half: (S+A) */
208 RELOC_NUMBER (R_AARCH64_ABS16, 259)
209 
210 /* .xword: (S+A-P) */
211 RELOC_NUMBER (R_AARCH64_PREL64, 260)
212 
213 /* .word: (S+A-P) */
214 RELOC_NUMBER (R_AARCH64_PREL32, 261)
215 
216 /* .half:  (S+A-P) */
217 RELOC_NUMBER (R_AARCH64_PREL16, 262)
218 
219 /* Group relocations to create a 16, 32, 48 or 64 bit
220    unsigned data or abs address inline.  */
221 
222 /* MOV[ZK]:   ((S+A) >>  0) & 0xffff */
223 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G0,		263)
224 
225 /* MOV[ZK]:   ((S+A) >>  0) & 0xffff */
226 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G0_NC, 264)
227 
228 /* MOV[ZK]:   ((S+A) >> 16) & 0xffff */
229 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G1, 265)
230 
231 /* MOV[ZK]:   ((S+A) >> 16) & 0xffff */
232 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G1_NC, 266)
233 
234 /* MOV[ZK]:   ((S+A) >> 32) & 0xffff */
235 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G2, 267)
236 
237 /* MOV[ZK]:   ((S+A) >> 32) & 0xffff */
238 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G2_NC, 268)
239 
240 /* MOV[ZK]:   ((S+A) >> 48) & 0xffff */
241 RELOC_NUMBER (R_AARCH64_MOVW_UABS_G3, 269)
242 
243 /* Group relocations to create high part of a 16, 32, 48 or 64 bit
244    signed data or abs address inline. Will change instruction
245    to MOVN or MOVZ depending on sign of calculated value.  */
246 
247 /* MOV[ZN]:   ((S+A) >>  0) & 0xffff */
248 RELOC_NUMBER (R_AARCH64_MOVW_SABS_G0, 270)
249 
250 /* MOV[ZN]:   ((S+A) >> 16) & 0xffff */
251 RELOC_NUMBER (R_AARCH64_MOVW_SABS_G1, 271)
252 
253 /* MOV[ZN]:   ((S+A) >> 32) & 0xffff */
254 RELOC_NUMBER (R_AARCH64_MOVW_SABS_G2, 272)
255 
256 /* Relocations to generate 19, 21 and 33 bit PC-relative load/store
257    addresses: PG(x) is (x & ~0xfff).  */
258 
259 /* LD-lit: ((S+A-P) >> 2) & 0x7ffff */
260 RELOC_NUMBER (R_AARCH64_LD_PREL_LO19, 273)
261 
262 /* ADR:    (S+A-P) & 0x1fffff */
263 RELOC_NUMBER (R_AARCH64_ADR_PREL_LO21, 274)
264 
265 /* ADRH:   ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */
266 RELOC_NUMBER (R_AARCH64_ADR_PREL_PG_HI21, 275)
267 
268 /* ADRH:   ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */
269 RELOC_NUMBER (R_AARCH64_ADR_PREL_PG_HI21_NC, 276)
270 
271 /* ADD:    (S+A) & 0xfff */
272 RELOC_NUMBER (R_AARCH64_ADD_ABS_LO12_NC, 277)
273 
274 /* LD/ST8: (S+A) & 0xfff */
275 RELOC_NUMBER (R_AARCH64_LDST8_ABS_LO12_NC, 278)
276 
277 /* Relocations for control-flow instructions.  */
278 
279 /* TBZ/NZ: ((S+A-P) >> 2) & 0x3fff.  */
280 RELOC_NUMBER (R_AARCH64_TSTBR14, 279)
281 
282 /* B.cond: ((S+A-P) >> 2) & 0x7ffff.  */
283 RELOC_NUMBER (R_AARCH64_CONDBR19, 280)
284 
285 /* 281 unused */
286 
287 /* B:      ((S+A-P) >> 2) & 0x3ffffff.  */
288 RELOC_NUMBER (R_AARCH64_JUMP26, 282)
289 
290 /* BL:     ((S+A-P) >> 2) & 0x3ffffff.  */
291 RELOC_NUMBER (R_AARCH64_CALL26, 283)
292 
293 /* LD/ST16: (S+A) & 0xffe */
294 RELOC_NUMBER (R_AARCH64_LDST16_ABS_LO12_NC, 284)
295 
296 /* LD/ST32: (S+A) & 0xffc */
297 RELOC_NUMBER (R_AARCH64_LDST32_ABS_LO12_NC, 285)
298 
299 /* LD/ST64: (S+A) & 0xff8 */
300 RELOC_NUMBER (R_AARCH64_LDST64_ABS_LO12_NC, 286)
301 
302 /* Group relocations to create a 16, 32, 48, or 64 bit PC-relative
303    offset inline.  */
304 
305 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G0, 287)
306 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G0_NC, 288)
307 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G1, 289)
308 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G1_NC, 290)
309 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G2, 291)
310 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G2_NC, 292)
311 RELOC_NUMBER (R_AARCH64_MOVW_PREL_G3, 293)
312 
313 /* LD/ST128: (S+A) & 0xff0 */
314 RELOC_NUMBER (R_AARCH64_LDST128_ABS_LO12_NC, 299)
315 
316 /* Group relocations to create a 16, 32, 48, or 64 bit GOT-relative
317    offset inline.  */
318 
319 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G0, 300)
320 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G0_NC, 301)
321 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G1, 302)
322 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G1_NC, 303)
323 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G2, 304)
324 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G2_NC, 305)
325 RELOC_NUMBER (R_AARCH64_MOVW_GOTOFF_G3, 306)
326 
327 /* GOT-relative data relocations.  */
328 
329 RELOC_NUMBER (R_AARCH64_GOTREL64, 307)
330 RELOC_NUMBER (R_AARCH64_GOTREL32, 308)
331 
332 /* GOT-relative instruction relocations.  */
333 
334 RELOC_NUMBER (R_AARCH64_GOT_LD_PREL19, 309)
335 RELOC_NUMBER (R_AARCH64_LD64_GOTOFF_LO15, 310)
336 RELOC_NUMBER (R_AARCH64_ADR_GOT_PAGE, 311)
337 RELOC_NUMBER (R_AARCH64_LD64_GOT_LO12_NC, 312)
338 RELOC_NUMBER (R_AARCH64_LD64_GOTPAGE_LO15, 313)
339 
340 /* General Dynamic TLS relocations.  */
341 
342 RELOC_NUMBER (R_AARCH64_TLSGD_ADR_PREL21, 512)
343 RELOC_NUMBER (R_AARCH64_TLSGD_ADR_PAGE21, 513)
344 RELOC_NUMBER (R_AARCH64_TLSGD_ADD_LO12_NC, 514)
345 RELOC_NUMBER (R_AARCH64_TLSGD_MOVW_G1, 515)
346 RELOC_NUMBER (R_AARCH64_TLSGD_MOVW_G0_NC, 516)
347 
348 /* Local Dynamic TLS relocations.  */
349 
350 RELOC_NUMBER (R_AARCH64_TLSLD_ADR_PREL21, 517)
351 RELOC_NUMBER (R_AARCH64_TLSLD_ADR_PAGE21, 518)
352 RELOC_NUMBER (R_AARCH64_TLSLD_ADD_LO12_NC, 519)
353 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_G1, 520)
354 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_G0_NC, 521)
355 RELOC_NUMBER (R_AARCH64_TLSLD_LD_PREL19, 522)
356 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G2, 523)
357 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G1, 524)
358 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, 525)
359 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G0, 526)
360 RELOC_NUMBER (R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, 527)
361 RELOC_NUMBER (R_AARCH64_TLSLD_ADD_DTPREL_HI12, 528)
362 RELOC_NUMBER (R_AARCH64_TLSLD_ADD_DTPREL_LO12, 529)
363 RELOC_NUMBER (R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, 530)
364 RELOC_NUMBER (R_AARCH64_TLSLD_LDST8_DTPREL_LO12, 531)
365 RELOC_NUMBER (R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, 532)
366 RELOC_NUMBER (R_AARCH64_TLSLD_LDST16_DTPREL_LO12, 533)
367 RELOC_NUMBER (R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, 534)
368 RELOC_NUMBER (R_AARCH64_TLSLD_LDST32_DTPREL_LO12, 535)
369 RELOC_NUMBER (R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, 536)
370 RELOC_NUMBER (R_AARCH64_TLSLD_LDST64_DTPREL_LO12, 537)
371 RELOC_NUMBER (R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, 538)
372 
373 /* Initial Exec TLS relocations.  */
374 
375 RELOC_NUMBER (R_AARCH64_TLSIE_MOVW_GOTTPREL_G1, 539)
376 RELOC_NUMBER (R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, 540)
377 RELOC_NUMBER (R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, 541)
378 RELOC_NUMBER (R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, 542)
379 RELOC_NUMBER (R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, 543)
380 
381 /* Local Exec TLS relocations.  */
382 
383 RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G2, 544)
384 RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G1, 545)
385 RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, 546)
386 RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G0, 547)
387 RELOC_NUMBER (R_AARCH64_TLSLE_MOVW_TPREL_G0_NC, 548)
388 RELOC_NUMBER (R_AARCH64_TLSLE_ADD_TPREL_HI12, 549)
389 RELOC_NUMBER (R_AARCH64_TLSLE_ADD_TPREL_LO12, 550)
390 RELOC_NUMBER (R_AARCH64_TLSLE_ADD_TPREL_LO12_NC, 551)
391 RELOC_NUMBER (R_AARCH64_TLSLE_LDST8_TPREL_LO12, 552)
392 RELOC_NUMBER (R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, 553)
393 RELOC_NUMBER (R_AARCH64_TLSLE_LDST16_TPREL_LO12, 554)
394 RELOC_NUMBER (R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, 555)
395 RELOC_NUMBER (R_AARCH64_TLSLE_LDST32_TPREL_LO12, 556)
396 RELOC_NUMBER (R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, 557)
397 RELOC_NUMBER (R_AARCH64_TLSLE_LDST64_TPREL_LO12, 558)
398 RELOC_NUMBER (R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, 559)
399 
400 /* TLS descriptor relocations.  */
401 
402 RELOC_NUMBER (R_AARCH64_TLSDESC_LD_PREL19, 560)
403 RELOC_NUMBER (R_AARCH64_TLSDESC_ADR_PREL21, 561)
404 RELOC_NUMBER (R_AARCH64_TLSDESC_ADR_PAGE21, 562)
405 RELOC_NUMBER (R_AARCH64_TLSDESC_LD64_LO12, 563)
406 RELOC_NUMBER (R_AARCH64_TLSDESC_ADD_LO12, 564)
407 RELOC_NUMBER (R_AARCH64_TLSDESC_OFF_G1, 565)
408 RELOC_NUMBER (R_AARCH64_TLSDESC_OFF_G0_NC, 566)
409 RELOC_NUMBER (R_AARCH64_TLSDESC_LDR, 567)
410 RELOC_NUMBER (R_AARCH64_TLSDESC_ADD, 568)
411 RELOC_NUMBER (R_AARCH64_TLSDESC_CALL, 569)
412 
413 RELOC_NUMBER (R_AARCH64_TLSLE_LDST128_TPREL_LO12, 570)
414 RELOC_NUMBER (R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC, 571)
415 RELOC_NUMBER (R_AARCH64_TLSLD_LDST128_DTPREL_LO12, 572)
416 RELOC_NUMBER (R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC, 573)
417 
418 /* Dynamic relocations */
419 
420 /* Copy symbol at runtime.  */
421 RELOC_NUMBER (R_AARCH64_COPY, 1024)
422 
423 /* Create GOT entry.  */
424 RELOC_NUMBER (R_AARCH64_GLOB_DAT, 1025)
425 
426  /* Create PLT entry.  */
427 RELOC_NUMBER (R_AARCH64_JUMP_SLOT, 1026)
428 
429 /* Adjust by program base.  */
430 RELOC_NUMBER (R_AARCH64_RELATIVE, 1027)
431 RELOC_NUMBER (R_AARCH64_TLS_DTPMOD64, 1028)
432 RELOC_NUMBER (R_AARCH64_TLS_DTPREL64, 1029)
433 RELOC_NUMBER (R_AARCH64_TLS_TPREL64, 1030)
434 /* Aliasing relocs are guarded by RELOC_MACROS_GEN_FUNC
435    so that readelf.c won't generate duplicated case
436    statements.  */
437 #ifndef RELOC_MACROS_GEN_FUNC
438 RELOC_NUMBER (R_AARCH64_TLS_DTPMOD, 1028)
439 RELOC_NUMBER (R_AARCH64_TLS_DTPREL, 1029)
440 RELOC_NUMBER (R_AARCH64_TLS_TPREL, 1030)
441 #endif
442 RELOC_NUMBER (R_AARCH64_TLSDESC, 1031)
443 RELOC_NUMBER (R_AARCH64_IRELATIVE, 1032)
444 
445 END_RELOC_NUMBERS (R_AARCH64_end)
446 
447 #endif /* _ELF_AARCH64_H */
448