1
-
2
1
#ifndef ELF_RELOC
3
2
#error "ELF_RELOC must be defined"
4
3
#endif
5
4
6
- // Based on ABI release 1.1-beta, dated 6 November 2013. NB: The cover page of
7
- // this document, IHI0056C_beta_aaelf64.pdf, on infocenter.arm.com, still
8
- // labels this as release 1.0.
5
+ // Based on released ABI: https://github.com/ARM-software/abi-aa, aaelf64.
6
+ // ELF64
7
+ // Null relocation: also 0x100 for ELF64
9
8
ELF_RELOC(R_AARCH64_NONE, 0)
9
+ // Data relocations
10
10
ELF_RELOC(R_AARCH64_ABS64, 0x101)
11
11
ELF_RELOC(R_AARCH64_ABS32, 0x102)
12
12
ELF_RELOC(R_AARCH64_ABS16, 0x103)
13
13
ELF_RELOC(R_AARCH64_PREL64, 0x104)
14
14
ELF_RELOC(R_AARCH64_PREL32, 0x105)
15
15
ELF_RELOC(R_AARCH64_PREL16, 0x106)
16
+ // Static AArch64 relocations
16
17
ELF_RELOC(R_AARCH64_MOVW_UABS_G0, 0x107)
17
18
ELF_RELOC(R_AARCH64_MOVW_UABS_G0_NC, 0x108)
18
19
ELF_RELOC(R_AARCH64_MOVW_UABS_G1, 0x109)
@@ -60,11 +61,13 @@ ELF_RELOC(R_AARCH64_LD64_GOT_LO12_NC, 0x138)
60
61
ELF_RELOC(R_AARCH64_LD64_GOTPAGE_LO15, 0x139)
61
62
ELF_RELOC(R_AARCH64_PLT32, 0x13a)
62
63
ELF_RELOC(R_AARCH64_GOTPCREL32, 0x13b)
64
+ // General dynamic TLS relocations
63
65
ELF_RELOC(R_AARCH64_TLSGD_ADR_PREL21, 0x200)
64
66
ELF_RELOC(R_AARCH64_TLSGD_ADR_PAGE21, 0x201)
65
67
ELF_RELOC(R_AARCH64_TLSGD_ADD_LO12_NC, 0x202)
66
68
ELF_RELOC(R_AARCH64_TLSGD_MOVW_G1, 0x203)
67
69
ELF_RELOC(R_AARCH64_TLSGD_MOVW_G0_NC, 0x204)
70
+ // Local dynamic TLS relocations
68
71
ELF_RELOC(R_AARCH64_TLSLD_ADR_PREL21, 0x205)
69
72
ELF_RELOC(R_AARCH64_TLSLD_ADR_PAGE21, 0x206)
70
73
ELF_RELOC(R_AARCH64_TLSLD_ADD_LO12_NC, 0x207)
@@ -92,6 +95,7 @@ ELF_RELOC(R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, 0x21c)
92
95
ELF_RELOC(R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, 0x21d)
93
96
ELF_RELOC(R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, 0x21e)
94
97
ELF_RELOC(R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, 0x21f)
98
+ // Local exec TLS relocations
95
99
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G2, 0x220)
96
100
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G1, 0x221)
97
101
ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, 0x222)
@@ -108,6 +112,7 @@ ELF_RELOC(R_AARCH64_TLSLE_LDST32_TPREL_LO12, 0x22c)
108
112
ELF_RELOC(R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, 0x22d)
109
113
ELF_RELOC(R_AARCH64_TLSLE_LDST64_TPREL_LO12, 0x22e)
110
114
ELF_RELOC(R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, 0x22f)
115
+ // TLS descriptor relocations
111
116
ELF_RELOC(R_AARCH64_TLSDESC_LD_PREL19, 0x230)
112
117
ELF_RELOC(R_AARCH64_TLSDESC_ADR_PREL21, 0x231)
113
118
ELF_RELOC(R_AARCH64_TLSDESC_ADR_PAGE21, 0x232)
@@ -122,8 +127,7 @@ ELF_RELOC(R_AARCH64_TLSLE_LDST128_TPREL_LO12, 0x23a)
122
127
ELF_RELOC(R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC, 0x23b)
123
128
ELF_RELOC(R_AARCH64_TLSLD_LDST128_DTPREL_LO12, 0x23c)
124
129
ELF_RELOC(R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC, 0x23d)
125
- ELF_RELOC(R_AARCH64_AUTH_ABS64, 0x244)
126
- // Dynamic relocations start
130
+ // Dynamic relocations
127
131
ELF_RELOC(R_AARCH64_COPY, 0x400)
128
132
ELF_RELOC(R_AARCH64_GLOB_DAT, 0x401)
129
133
ELF_RELOC(R_AARCH64_JUMP_SLOT, 0x402)
@@ -136,8 +140,12 @@ ELF_RELOC(R_AARCH64_TLS_DTPREL64, 0x405)
136
140
ELF_RELOC(R_AARCH64_TLS_TPREL64, 0x406)
137
141
ELF_RELOC(R_AARCH64_TLSDESC, 0x407)
138
142
ELF_RELOC(R_AARCH64_IRELATIVE, 0x408)
143
+ // PAuthABI static and dynamic relocations: defined in pauthabielf64,
144
+ // https://github.com/ARM-software/abi-aa
145
+ ELF_RELOC(R_AARCH64_AUTH_ABS64, 0x244)
139
146
ELF_RELOC(R_AARCH64_AUTH_RELATIVE, 0x411)
140
147
148
+ // ELF32
141
149
// ELF_RELOC(R_AARCH64_P32_NONE, 0)
142
150
ELF_RELOC(R_AARCH64_P32_ABS32, 0x001)
143
151
ELF_RELOC(R_AARCH64_P32_ABS16, 0x002)
@@ -216,7 +224,7 @@ ELF_RELOC(R_AARCH64_P32_TLSDESC_ADR_PAGE21, 0x07c)
216
224
ELF_RELOC(R_AARCH64_P32_TLSDESC_LD32_LO12, 0x07d)
217
225
ELF_RELOC(R_AARCH64_P32_TLSDESC_ADD_LO12, 0x07e)
218
226
ELF_RELOC(R_AARCH64_P32_TLSDESC_CALL, 0x07f)
219
- // Dynamic relocations start
227
+ // Dynamic relocations
220
228
ELF_RELOC(R_AARCH64_P32_COPY, 0x0b4)
221
229
ELF_RELOC(R_AARCH64_P32_GLOB_DAT, 0x0b5)
222
230
ELF_RELOC(R_AARCH64_P32_JUMP_SLOT, 0x0b6)
0 commit comments