Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | |
2 | #ifndef ELF_RELOC |
||
3 | #error "ELF_RELOC must be defined" |
||
4 | #endif |
||
5 | |||
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. |
||
9 | ELF_RELOC(R_AARCH64_NONE, 0) |
||
10 | ELF_RELOC(R_AARCH64_ABS64, 0x101) |
||
11 | ELF_RELOC(R_AARCH64_ABS32, 0x102) |
||
12 | ELF_RELOC(R_AARCH64_ABS16, 0x103) |
||
13 | ELF_RELOC(R_AARCH64_PREL64, 0x104) |
||
14 | ELF_RELOC(R_AARCH64_PREL32, 0x105) |
||
15 | ELF_RELOC(R_AARCH64_PREL16, 0x106) |
||
16 | ELF_RELOC(R_AARCH64_MOVW_UABS_G0, 0x107) |
||
17 | ELF_RELOC(R_AARCH64_MOVW_UABS_G0_NC, 0x108) |
||
18 | ELF_RELOC(R_AARCH64_MOVW_UABS_G1, 0x109) |
||
19 | ELF_RELOC(R_AARCH64_MOVW_UABS_G1_NC, 0x10a) |
||
20 | ELF_RELOC(R_AARCH64_MOVW_UABS_G2, 0x10b) |
||
21 | ELF_RELOC(R_AARCH64_MOVW_UABS_G2_NC, 0x10c) |
||
22 | ELF_RELOC(R_AARCH64_MOVW_UABS_G3, 0x10d) |
||
23 | ELF_RELOC(R_AARCH64_MOVW_SABS_G0, 0x10e) |
||
24 | ELF_RELOC(R_AARCH64_MOVW_SABS_G1, 0x10f) |
||
25 | ELF_RELOC(R_AARCH64_MOVW_SABS_G2, 0x110) |
||
26 | ELF_RELOC(R_AARCH64_LD_PREL_LO19, 0x111) |
||
27 | ELF_RELOC(R_AARCH64_ADR_PREL_LO21, 0x112) |
||
28 | ELF_RELOC(R_AARCH64_ADR_PREL_PG_HI21, 0x113) |
||
29 | ELF_RELOC(R_AARCH64_ADR_PREL_PG_HI21_NC, 0x114) |
||
30 | ELF_RELOC(R_AARCH64_ADD_ABS_LO12_NC, 0x115) |
||
31 | ELF_RELOC(R_AARCH64_LDST8_ABS_LO12_NC, 0x116) |
||
32 | ELF_RELOC(R_AARCH64_TSTBR14, 0x117) |
||
33 | ELF_RELOC(R_AARCH64_CONDBR19, 0x118) |
||
34 | ELF_RELOC(R_AARCH64_JUMP26, 0x11a) |
||
35 | ELF_RELOC(R_AARCH64_CALL26, 0x11b) |
||
36 | ELF_RELOC(R_AARCH64_LDST16_ABS_LO12_NC, 0x11c) |
||
37 | ELF_RELOC(R_AARCH64_LDST32_ABS_LO12_NC, 0x11d) |
||
38 | ELF_RELOC(R_AARCH64_LDST64_ABS_LO12_NC, 0x11e) |
||
39 | ELF_RELOC(R_AARCH64_MOVW_PREL_G0, 0x11f) |
||
40 | ELF_RELOC(R_AARCH64_MOVW_PREL_G0_NC, 0x120) |
||
41 | ELF_RELOC(R_AARCH64_MOVW_PREL_G1, 0x121) |
||
42 | ELF_RELOC(R_AARCH64_MOVW_PREL_G1_NC, 0x122) |
||
43 | ELF_RELOC(R_AARCH64_MOVW_PREL_G2, 0x123) |
||
44 | ELF_RELOC(R_AARCH64_MOVW_PREL_G2_NC, 0x124) |
||
45 | ELF_RELOC(R_AARCH64_MOVW_PREL_G3, 0x125) |
||
46 | ELF_RELOC(R_AARCH64_LDST128_ABS_LO12_NC, 0x12b) |
||
47 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G0, 0x12c) |
||
48 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G0_NC, 0x12d) |
||
49 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G1, 0x12e) |
||
50 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G1_NC, 0x12f) |
||
51 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G2, 0x130) |
||
52 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G2_NC, 0x131) |
||
53 | ELF_RELOC(R_AARCH64_MOVW_GOTOFF_G3, 0x132) |
||
54 | ELF_RELOC(R_AARCH64_GOTREL64, 0x133) |
||
55 | ELF_RELOC(R_AARCH64_GOTREL32, 0x134) |
||
56 | ELF_RELOC(R_AARCH64_GOT_LD_PREL19, 0x135) |
||
57 | ELF_RELOC(R_AARCH64_LD64_GOTOFF_LO15, 0x136) |
||
58 | ELF_RELOC(R_AARCH64_ADR_GOT_PAGE, 0x137) |
||
59 | ELF_RELOC(R_AARCH64_LD64_GOT_LO12_NC, 0x138) |
||
60 | ELF_RELOC(R_AARCH64_LD64_GOTPAGE_LO15, 0x139) |
||
61 | ELF_RELOC(R_AARCH64_PLT32, 0x13a) |
||
62 | ELF_RELOC(R_AARCH64_TLSGD_ADR_PREL21, 0x200) |
||
63 | ELF_RELOC(R_AARCH64_TLSGD_ADR_PAGE21, 0x201) |
||
64 | ELF_RELOC(R_AARCH64_TLSGD_ADD_LO12_NC, 0x202) |
||
65 | ELF_RELOC(R_AARCH64_TLSGD_MOVW_G1, 0x203) |
||
66 | ELF_RELOC(R_AARCH64_TLSGD_MOVW_G0_NC, 0x204) |
||
67 | ELF_RELOC(R_AARCH64_TLSLD_ADR_PREL21, 0x205) |
||
68 | ELF_RELOC(R_AARCH64_TLSLD_ADR_PAGE21, 0x206) |
||
69 | ELF_RELOC(R_AARCH64_TLSLD_ADD_LO12_NC, 0x207) |
||
70 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_G1, 0x208) |
||
71 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_G0_NC, 0x209) |
||
72 | ELF_RELOC(R_AARCH64_TLSLD_LD_PREL19, 0x20a) |
||
73 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G2, 0x20b) |
||
74 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G1, 0x20c) |
||
75 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, 0x20d) |
||
76 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G0, 0x20e) |
||
77 | ELF_RELOC(R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, 0x20f) |
||
78 | ELF_RELOC(R_AARCH64_TLSLD_ADD_DTPREL_HI12, 0x210) |
||
79 | ELF_RELOC(R_AARCH64_TLSLD_ADD_DTPREL_LO12, 0x211) |
||
80 | ELF_RELOC(R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC, 0x212) |
||
81 | ELF_RELOC(R_AARCH64_TLSLD_LDST8_DTPREL_LO12, 0x213) |
||
82 | ELF_RELOC(R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, 0x214) |
||
83 | ELF_RELOC(R_AARCH64_TLSLD_LDST16_DTPREL_LO12, 0x215) |
||
84 | ELF_RELOC(R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, 0x216) |
||
85 | ELF_RELOC(R_AARCH64_TLSLD_LDST32_DTPREL_LO12, 0x217) |
||
86 | ELF_RELOC(R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, 0x218) |
||
87 | ELF_RELOC(R_AARCH64_TLSLD_LDST64_DTPREL_LO12, 0x219) |
||
88 | ELF_RELOC(R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, 0x21a) |
||
89 | ELF_RELOC(R_AARCH64_TLSIE_MOVW_GOTTPREL_G1, 0x21b) |
||
90 | ELF_RELOC(R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC, 0x21c) |
||
91 | ELF_RELOC(R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, 0x21d) |
||
92 | ELF_RELOC(R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, 0x21e) |
||
93 | ELF_RELOC(R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, 0x21f) |
||
94 | ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G2, 0x220) |
||
95 | ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G1, 0x221) |
||
96 | ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, 0x222) |
||
97 | ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G0, 0x223) |
||
98 | ELF_RELOC(R_AARCH64_TLSLE_MOVW_TPREL_G0_NC, 0x224) |
||
99 | ELF_RELOC(R_AARCH64_TLSLE_ADD_TPREL_HI12, 0x225) |
||
100 | ELF_RELOC(R_AARCH64_TLSLE_ADD_TPREL_LO12, 0x226) |
||
101 | ELF_RELOC(R_AARCH64_TLSLE_ADD_TPREL_LO12_NC, 0x227) |
||
102 | ELF_RELOC(R_AARCH64_TLSLE_LDST8_TPREL_LO12, 0x228) |
||
103 | ELF_RELOC(R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC, 0x229) |
||
104 | ELF_RELOC(R_AARCH64_TLSLE_LDST16_TPREL_LO12, 0x22a) |
||
105 | ELF_RELOC(R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, 0x22b) |
||
106 | ELF_RELOC(R_AARCH64_TLSLE_LDST32_TPREL_LO12, 0x22c) |
||
107 | ELF_RELOC(R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, 0x22d) |
||
108 | ELF_RELOC(R_AARCH64_TLSLE_LDST64_TPREL_LO12, 0x22e) |
||
109 | ELF_RELOC(R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, 0x22f) |
||
110 | ELF_RELOC(R_AARCH64_TLSDESC_LD_PREL19, 0x230) |
||
111 | ELF_RELOC(R_AARCH64_TLSDESC_ADR_PREL21, 0x231) |
||
112 | ELF_RELOC(R_AARCH64_TLSDESC_ADR_PAGE21, 0x232) |
||
113 | ELF_RELOC(R_AARCH64_TLSDESC_LD64_LO12, 0x233) |
||
114 | ELF_RELOC(R_AARCH64_TLSDESC_ADD_LO12, 0x234) |
||
115 | ELF_RELOC(R_AARCH64_TLSDESC_OFF_G1, 0x235) |
||
116 | ELF_RELOC(R_AARCH64_TLSDESC_OFF_G0_NC, 0x236) |
||
117 | ELF_RELOC(R_AARCH64_TLSDESC_LDR, 0x237) |
||
118 | ELF_RELOC(R_AARCH64_TLSDESC_ADD, 0x238) |
||
119 | ELF_RELOC(R_AARCH64_TLSDESC_CALL, 0x239) |
||
120 | ELF_RELOC(R_AARCH64_TLSLE_LDST128_TPREL_LO12, 0x23a) |
||
121 | ELF_RELOC(R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC, 0x23b) |
||
122 | ELF_RELOC(R_AARCH64_TLSLD_LDST128_DTPREL_LO12, 0x23c) |
||
123 | ELF_RELOC(R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC, 0x23d) |
||
124 | // Dynamic relocations start |
||
125 | ELF_RELOC(R_AARCH64_COPY, 0x400) |
||
126 | ELF_RELOC(R_AARCH64_GLOB_DAT, 0x401) |
||
127 | ELF_RELOC(R_AARCH64_JUMP_SLOT, 0x402) |
||
128 | ELF_RELOC(R_AARCH64_RELATIVE, 0x403) |
||
129 | // 0x404 and 0x405 are now R_AARCH64_TLS_IMPDEF1 and R_AARCH64_TLS_IMPDEF2 |
||
130 | // We follow GNU and define TLS_IMPDEF1 as TLS_DTPMOD64 and TLS_IMPDEF2 as |
||
131 | // TLS_DTPREL64 |
||
132 | ELF_RELOC(R_AARCH64_TLS_DTPMOD64, 0x404) |
||
133 | ELF_RELOC(R_AARCH64_TLS_DTPREL64, 0x405) |
||
134 | ELF_RELOC(R_AARCH64_TLS_TPREL64, 0x406) |
||
135 | ELF_RELOC(R_AARCH64_TLSDESC, 0x407) |
||
136 | ELF_RELOC(R_AARCH64_IRELATIVE, 0x408) |
||
137 | |||
138 | // ELF_RELOC(R_AARCH64_P32_NONE, 0) |
||
139 | ELF_RELOC(R_AARCH64_P32_ABS32, 0x001) |
||
140 | ELF_RELOC(R_AARCH64_P32_ABS16, 0x002) |
||
141 | ELF_RELOC(R_AARCH64_P32_PREL32, 0x003) |
||
142 | ELF_RELOC(R_AARCH64_P32_PREL16, 0x004) |
||
143 | ELF_RELOC(R_AARCH64_P32_MOVW_UABS_G0, 0x005) |
||
144 | ELF_RELOC(R_AARCH64_P32_MOVW_UABS_G0_NC, 0x006) |
||
145 | ELF_RELOC(R_AARCH64_P32_MOVW_UABS_G1, 0x007) |
||
146 | ELF_RELOC(R_AARCH64_P32_MOVW_SABS_G0, 0x008) |
||
147 | ELF_RELOC(R_AARCH64_P32_LD_PREL_LO19, 0x009) |
||
148 | ELF_RELOC(R_AARCH64_P32_ADR_PREL_LO21, 0x00a) |
||
149 | ELF_RELOC(R_AARCH64_P32_ADR_PREL_PG_HI21, 0x00b) |
||
150 | ELF_RELOC(R_AARCH64_P32_ADD_ABS_LO12_NC, 0x00c) |
||
151 | ELF_RELOC(R_AARCH64_P32_LDST8_ABS_LO12_NC, 0x00d) |
||
152 | ELF_RELOC(R_AARCH64_P32_LDST16_ABS_LO12_NC, 0x00e) |
||
153 | ELF_RELOC(R_AARCH64_P32_LDST32_ABS_LO12_NC, 0x00f) |
||
154 | ELF_RELOC(R_AARCH64_P32_LDST64_ABS_LO12_NC, 0x010) |
||
155 | ELF_RELOC(R_AARCH64_P32_LDST128_ABS_LO12_NC, 0x011) |
||
156 | ELF_RELOC(R_AARCH64_P32_TSTBR14, 0x012) |
||
157 | ELF_RELOC(R_AARCH64_P32_CONDBR19, 0x013) |
||
158 | ELF_RELOC(R_AARCH64_P32_JUMP26, 0x014) |
||
159 | ELF_RELOC(R_AARCH64_P32_CALL26, 0x015) |
||
160 | ELF_RELOC(R_AARCH64_P32_MOVW_PREL_G0, 0x016) |
||
161 | ELF_RELOC(R_AARCH64_P32_MOVW_PREL_G0_NC, 0x017) |
||
162 | ELF_RELOC(R_AARCH64_P32_MOVW_PREL_G1, 0x018) |
||
163 | ELF_RELOC(R_AARCH64_P32_GOT_LD_PREL19, 0x019) |
||
164 | ELF_RELOC(R_AARCH64_P32_ADR_GOT_PAGE, 0x01a) |
||
165 | ELF_RELOC(R_AARCH64_P32_LD32_GOT_LO12_NC, 0x01b) |
||
166 | ELF_RELOC(R_AARCH64_P32_LD32_GOTPAGE_LO14, 0x01c) |
||
167 | ELF_RELOC(R_AARCH64_P32_PLT32, 0x01d) |
||
168 | ELF_RELOC(R_AARCH64_P32_TLSGD_ADR_PREL21, 0x050) |
||
169 | ELF_RELOC(R_AARCH64_P32_TLSGD_ADR_PAGE21, 0x051) |
||
170 | ELF_RELOC(R_AARCH64_P32_TLSGD_ADD_LO12_NC, 0x052) |
||
171 | ELF_RELOC(R_AARCH64_P32_TLSLD_ADR_PREL21, 0x053) |
||
172 | ELF_RELOC(R_AARCH64_P32_TLSLD_ADR_PAGE21, 0x054) |
||
173 | ELF_RELOC(R_AARCH64_P32_TLSLD_ADD_LO12_NC, 0x055) |
||
174 | ELF_RELOC(R_AARCH64_P32_TLSLD_LD_PREL19, 0x056) |
||
175 | ELF_RELOC(R_AARCH64_P32_TLSLD_MOVW_DTPREL_G1, 0x057) |
||
176 | ELF_RELOC(R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0, 0x058) |
||
177 | ELF_RELOC(R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0_NC, 0x059) |
||
178 | ELF_RELOC(R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12, 0x05a) |
||
179 | ELF_RELOC(R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12, 0x05b) |
||
180 | ELF_RELOC(R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12_NC, 0x05c) |
||
181 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST8_DTPREL_LO12, 0x05d) |
||
182 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST8_DTPREL_LO12_NC, 0x05e) |
||
183 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST16_DTPREL_LO12, 0x05f) |
||
184 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST16_DTPREL_LO12_NC, 0x060) |
||
185 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST32_DTPREL_LO12, 0x061) |
||
186 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST32_DTPREL_LO12_NC, 0x062) |
||
187 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST64_DTPREL_LO12, 0x063) |
||
188 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST64_DTPREL_LO12_NC, 0x064) |
||
189 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST128_DTPREL_LO12, 0x065) |
||
190 | ELF_RELOC(R_AARCH64_P32_TLSLD_LDST128_DTPREL_LO12_NC,0x066) |
||
191 | ELF_RELOC(R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21, 0x067) |
||
192 | ELF_RELOC(R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC, 0x068) |
||
193 | ELF_RELOC(R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19, 0x069) |
||
194 | ELF_RELOC(R_AARCH64_P32_TLSLE_MOVW_TPREL_G1, 0x06a) |
||
195 | ELF_RELOC(R_AARCH64_P32_TLSLE_MOVW_TPREL_G0, 0x06b) |
||
196 | ELF_RELOC(R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC, 0x06c) |
||
197 | ELF_RELOC(R_AARCH64_P32_TLSLE_ADD_TPREL_HI12, 0x06d) |
||
198 | ELF_RELOC(R_AARCH64_P32_TLSLE_ADD_TPREL_LO12, 0x06e) |
||
199 | ELF_RELOC(R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC, 0x06f) |
||
200 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12, 0x070) |
||
201 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST8_TPREL_LO12_NC, 0x071) |
||
202 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12, 0x072) |
||
203 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST16_TPREL_LO12_NC, 0x073) |
||
204 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12, 0x074) |
||
205 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST32_TPREL_LO12_NC, 0x075) |
||
206 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12, 0x076) |
||
207 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST64_TPREL_LO12_NC, 0x077) |
||
208 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST128_TPREL_LO12, 0x078) |
||
209 | ELF_RELOC(R_AARCH64_P32_TLSLE_LDST128_TPREL_LO12_NC, 0x079) |
||
210 | ELF_RELOC(R_AARCH64_P32_TLSDESC_LD_PREL19, 0x07a) |
||
211 | ELF_RELOC(R_AARCH64_P32_TLSDESC_ADR_PREL21, 0x07b) |
||
212 | ELF_RELOC(R_AARCH64_P32_TLSDESC_ADR_PAGE21, 0x07c) |
||
213 | ELF_RELOC(R_AARCH64_P32_TLSDESC_LD32_LO12, 0x07d) |
||
214 | ELF_RELOC(R_AARCH64_P32_TLSDESC_ADD_LO12, 0x07e) |
||
215 | ELF_RELOC(R_AARCH64_P32_TLSDESC_CALL, 0x07f) |
||
216 | // Dynamic relocations start |
||
217 | ELF_RELOC(R_AARCH64_P32_COPY, 0x0b4) |
||
218 | ELF_RELOC(R_AARCH64_P32_GLOB_DAT, 0x0b5) |
||
219 | ELF_RELOC(R_AARCH64_P32_JUMP_SLOT, 0x0b6) |
||
220 | ELF_RELOC(R_AARCH64_P32_RELATIVE, 0x0b7) |
||
221 | ELF_RELOC(R_AARCH64_P32_TLS_DTPREL, 0x0b8) |
||
222 | ELF_RELOC(R_AARCH64_P32_TLS_DTPMOD, 0x0b9) |
||
223 | ELF_RELOC(R_AARCH64_P32_TLS_TPREL, 0x0ba) |
||
224 | ELF_RELOC(R_AARCH64_P32_TLSDESC, 0x0bb) |
||
225 | ELF_RELOC(R_AARCH64_P32_IRELATIVE, 0x0bc) |