2 * Copyright (c) 2009-2015 Kai Wang
3 * Copyright (c) 2016 The FreeBSD Foundation
6 * Portions of this software were developed by Ed Maste under sponsorship
7 * of the FreeBSD Foundation.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 elftc_reloc_type_str(unsigned int mach, unsigned int type)
37 static char s_type[32];
43 case 0: return "R_386_NONE";
44 case 1: return "R_386_32";
45 case 2: return "R_386_PC32";
46 case 3: return "R_386_GOT32";
47 case 4: return "R_386_PLT32";
48 case 5: return "R_386_COPY";
49 case 6: return "R_386_GLOB_DAT";
50 case 7: return "R_386_JUMP_SLOT";
51 case 8: return "R_386_RELATIVE";
52 case 9: return "R_386_GOTOFF";
53 case 10: return "R_386_GOTPC";
54 case 11: return "R_386_32PLT"; /* Not in psabi */
55 case 14: return "R_386_TLS_TPOFF";
56 case 15: return "R_386_TLS_IE";
57 case 16: return "R_386_TLS_GOTIE";
58 case 17: return "R_386_TLS_LE";
59 case 18: return "R_386_TLS_GD";
60 case 19: return "R_386_TLS_LDM";
61 case 20: return "R_386_16";
62 case 21: return "R_386_PC16";
63 case 22: return "R_386_8";
64 case 23: return "R_386_PC8";
65 case 24: return "R_386_TLS_GD_32";
66 case 25: return "R_386_TLS_GD_PUSH";
67 case 26: return "R_386_TLS_GD_CALL";
68 case 27: return "R_386_TLS_GD_POP";
69 case 28: return "R_386_TLS_LDM_32";
70 case 29: return "R_386_TLS_LDM_PUSH";
71 case 30: return "R_386_TLS_LDM_CALL";
72 case 31: return "R_386_TLS_LDM_POP";
73 case 32: return "R_386_TLS_LDO_32";
74 case 33: return "R_386_TLS_IE_32";
75 case 34: return "R_386_TLS_LE_32";
76 case 35: return "R_386_TLS_DTPMOD32";
77 case 36: return "R_386_TLS_DTPOFF32";
78 case 37: return "R_386_TLS_TPOFF32";
79 case 38: return "R_386_SIZE32";
80 case 39: return "R_386_TLS_GOTDESC";
81 case 40: return "R_386_TLS_DESC_CALL";
82 case 41: return "R_386_TLS_DESC";
83 case 42: return "R_386_IRELATIVE";
84 case 43: return "R_386_GOT32X";
89 case 0: return "R_AARCH64_NONE";
90 case 257: return "R_AARCH64_ABS64";
91 case 258: return "R_AARCH64_ABS32";
92 case 259: return "R_AARCH64_ABS16";
93 case 260: return "R_AARCH64_PREL64";
94 case 261: return "R_AARCH64_PREL32";
95 case 262: return "R_AARCH64_PREL16";
96 case 263: return "R_AARCH64_MOVW_UABS_G0";
97 case 264: return "R_AARCH64_MOVW_UABS_G0_NC";
98 case 265: return "R_AARCH64_MOVW_UABS_G1";
99 case 266: return "R_AARCH64_MOVW_UABS_G1_NC";
100 case 267: return "R_AARCH64_MOVW_UABS_G2";
101 case 268: return "R_AARCH64_MOVW_UABS_G2_NC";
102 case 269: return "R_AARCH64_MOVW_UABS_G3";
103 case 270: return "R_AARCH64_MOVW_SABS_G0";
104 case 271: return "R_AARCH64_MOVW_SABS_G1";
105 case 272: return "R_AARCH64_MOVW_SABS_G2";
106 case 273: return "R_AARCH64_LD_PREL_LO19";
107 case 274: return "R_AARCH64_ADR_PREL_LO21";
108 case 275: return "R_AARCH64_ADR_PREL_PG_HI21";
109 case 276: return "R_AARCH64_ADR_PREL_PG_HI21_NC";
110 case 277: return "R_AARCH64_ADD_ABS_LO12_NC";
111 case 278: return "R_AARCH64_LDST8_ABS_LO12_NC";
112 case 279: return "R_AARCH64_TSTBR14";
113 case 280: return "R_AARCH64_CONDBR19";
114 case 282: return "R_AARCH64_JUMP26";
115 case 283: return "R_AARCH64_CALL26";
116 case 284: return "R_AARCH64_LDST16_ABS_LO12_NC";
117 case 285: return "R_AARCH64_LDST32_ABS_LO12_NC";
118 case 286: return "R_AARCH64_LDST64_ABS_LO12_NC";
119 case 287: return "R_AARCH64_MOVW_PREL_G0";
120 case 288: return "R_AARCH64_MOVW_PREL_G0_NC";
121 case 289: return "R_AARCH64_MOVW_PREL_G1";
122 case 290: return "R_AARCH64_MOVW_PREL_G1_NC";
123 case 291: return "R_AARCH64_MOVW_PREL_G2";
124 case 292: return "R_AARCH64_MOVW_PREL_G2_NC";
125 case 293: return "R_AARCH64_MOVW_PREL_G3";
126 case 299: return "R_AARCH64_LDST128_ABS_LO12_NC";
127 case 300: return "R_AARCH64_MOVW_GOTOFF_G0";
128 case 301: return "R_AARCH64_MOVW_GOTOFF_G0_NC";
129 case 302: return "R_AARCH64_MOVW_GOTOFF_G1";
130 case 303: return "R_AARCH64_MOVW_GOTOFF_G1_NC";
131 case 304: return "R_AARCH64_MOVW_GOTOFF_G2";
132 case 305: return "R_AARCH64_MOVW_GOTOFF_G2_NC";
133 case 306: return "R_AARCH64_MOVW_GOTOFF_G3";
134 case 307: return "R_AARCH64_GOTREL64";
135 case 308: return "R_AARCH64_GOTREL32";
136 case 309: return "R_AARCH64_GOT_LD_PREL19";
137 case 310: return "R_AARCH64_LD64_GOTOFF_LO15";
138 case 311: return "R_AARCH64_ADR_GOT_PAGE";
139 case 312: return "R_AARCH64_LD64_GOT_LO12_NC";
140 case 313: return "R_AARCH64_LD64_GOTPAGE_LO15";
141 case 560: return "R_AARCH64_TLSDESC_LD_PREL19";
142 case 561: return "R_AARCH64_TLSDESC_ADR_PREL21";
143 case 562: return "R_AARCH64_TLSDESC_ADR_PAGE21";
144 case 563: return "R_AARCH64_TLSDESC_LD64_LO12";
145 case 564: return "R_AARCH64_TLSDESC_ADD_LO12";
146 case 565: return "R_AARCH64_TLSDESC_OFF_G1";
147 case 566: return "R_AARCH64_TLSDESC_OFF_G0_NC";
148 case 567: return "R_AARCH64_TLSDESC_LDR";
149 case 568: return "R_AARCH64_TLSDESC_ADD";
150 case 569: return "R_AARCH64_TLSDESC_CALL";
151 case 1024: return "R_AARCH64_COPY";
152 case 1025: return "R_AARCH64_GLOB_DAT";
153 case 1026: return "R_AARCH64_JUMP_SLOT";
154 case 1027: return "R_AARCH64_RELATIVE";
155 case 1028: return "R_AARCH64_TLS_DTPREL64";
156 case 1029: return "R_AARCH64_TLS_DTPMOD64";
157 case 1030: return "R_AARCH64_TLS_TPREL64";
158 case 1031: return "R_AARCH64_TLSDESC";
159 case 1032: return "R_AARCH64_IRELATIVE";
164 case 0: return "R_ARM_NONE";
165 case 1: return "R_ARM_PC24"; /* Deprecated */
166 case 2: return "R_ARM_ABS32";
167 case 3: return "R_ARM_REL32";
168 case 4: return "R_ARM_LDR_PC_G0"; /* Also R_ARM_PC13 */
169 case 5: return "R_ARM_ABS16";
170 case 6: return "R_ARM_ABS12";
171 case 7: return "R_ARM_THM_ABS5";
172 case 8: return "R_ARM_ABS8";
173 case 9: return "R_ARM_SBREL32";
174 case 10: return "R_ARM_THM_CALL"; /* Also R_ARM_THM_PC22 */
175 case 11: return "R_ARM_THM_PC8";
176 case 12: return "R_ARM_BREL_ADJ"; /* Also R_ARM_AMP_VCALL9 */
177 case 13: return "R_ARM_TLS_DESC"; /* Also R_ARM_SWI24 */
178 case 14: return "R_ARM_THM_SWI8"; /* Obsolete */
179 case 15: return "R_ARM_XPC25"; /* Obsolete */
180 case 16: return "R_ARM_THM_XPC22"; /* Obsolete */
181 case 17: return "R_ARM_TLS_DTPMOD32";
182 case 18: return "R_ARM_TLS_DTPOFF32";
183 case 19: return "R_ARM_TLS_TPOFF32";
184 case 20: return "R_ARM_COPY";
185 case 21: return "R_ARM_GLOB_DAT";
186 case 22: return "R_ARM_JUMP_SLOT";
187 case 23: return "R_ARM_RELATIVE";
188 case 24: return "R_ARM_GOTOFF32"; /* Also R_ARM_GOTOFF */
189 case 25: return "R_ARM_BASE_PREL"; /* GNU R_ARM_GOTPC */
190 case 26: return "R_ARM_GOT_BREL"; /* GNU R_ARM_GOT32 */
191 case 27: return "R_ARM_PLT32"; /* Deprecated */
192 case 28: return "R_ARM_CALL";
193 case 29: return "R_ARM_JUMP24";
194 case 30: return "R_ARM_THM_JUMP24";
195 case 31: return "R_ARM_BASE_ABS";
196 case 32: return "R_ARM_ALU_PCREL_7_0"; /* Obsolete */
197 case 33: return "R_ARM_ALU_PCREL_15_8"; /* Obsolete */
198 case 34: return "R_ARM_ALU_PCREL_23_15"; /* Obsolete */
199 case 35: return "R_ARM_LDR_SBREL_11_0_NC"; /* Deprecated */
200 case 36: return "R_ARM_ALU_SBREL_19_12_NC"; /* Deprecated */
201 case 37: return "R_ARM_ALU_SBREL_27_20_CK"; /* Deprecated */
202 case 38: return "R_ARM_TARGET1";
203 case 39: return "R_ARM_SBREL31"; /* Deprecated. */
204 case 40: return "R_ARM_V4BX";
205 case 41: return "R_ARM_TARGET2";
206 case 42: return "R_ARM_PREL31";
207 case 43: return "R_ARM_MOVW_ABS_NC";
208 case 44: return "R_ARM_MOVT_ABS";
209 case 45: return "R_ARM_MOVW_PREL_NC";
210 case 46: return "R_ARM_MOVT_PREL";
211 case 47: return "R_ARM_THM_MOVW_ABS_NC";
212 case 48: return "R_ARM_THM_MOVT_ABS";
213 case 49: return "R_ARM_THM_MOVW_PREL_NC";
214 case 50: return "R_ARM_THM_MOVT_PREL";
215 case 51: return "R_ARM_THM_JUMP19";
216 case 52: return "R_ARM_THM_JUMP6";
217 case 53: return "R_ARM_THM_ALU_PREL_11_0";
218 case 54: return "R_ARM_THM_PC12";
219 case 55: return "R_ARM_ABS32_NOI";
220 case 56: return "R_ARM_REL32_NOI";
221 case 57: return "R_ARM_ALU_PC_G0_NC";
222 case 58: return "R_ARM_ALU_PC_G0";
223 case 59: return "R_ARM_ALU_PC_G1_NC";
224 case 60: return "R_ARM_ALU_PC_G1";
225 case 61: return "R_ARM_ALU_PC_G2";
226 case 62: return "R_ARM_LDR_PC_G1";
227 case 63: return "R_ARM_LDR_PC_G2";
228 case 64: return "R_ARM_LDRS_PC_G0";
229 case 65: return "R_ARM_LDRS_PC_G1";
230 case 66: return "R_ARM_LDRS_PC_G2";
231 case 67: return "R_ARM_LDC_PC_G0";
232 case 68: return "R_ARM_LDC_PC_G1";
233 case 69: return "R_ARM_LDC_PC_G2";
234 case 70: return "R_ARM_ALU_SB_G0_NC";
235 case 71: return "R_ARM_ALU_SB_G0";
236 case 72: return "R_ARM_ALU_SB_G1_NC";
237 case 73: return "R_ARM_ALU_SB_G1";
238 case 74: return "R_ARM_ALU_SB_G2";
239 case 75: return "R_ARM_LDR_SB_G0";
240 case 76: return "R_ARM_LDR_SB_G1";
241 case 77: return "R_ARM_LDR_SB_G2";
242 case 78: return "R_ARM_LDRS_SB_G0";
243 case 79: return "R_ARM_LDRS_SB_G1";
244 case 80: return "R_ARM_LDRS_SB_G2";
245 case 81: return "R_ARM_LDC_SB_G0";
246 case 82: return "R_ARM_LDC_SB_G1";
247 case 83: return "R_ARM_LDC_SB_G2";
248 case 84: return "R_ARM_MOVW_BREL_NC";
249 case 85: return "R_ARM_MOVT_BREL";
250 case 86: return "R_ARM_MOVW_BREL";
251 case 87: return "R_ARM_THM_MOVW_BREL_NC";
252 case 88: return "R_ARM_THM_MOVT_BREL";
253 case 89: return "R_ARM_THM_MOVW_BREL";
254 case 90: return "R_ARM_TLS_GOTDESC";
255 case 91: return "R_ARM_TLS_CALL";
256 case 92: return "R_ARM_TLS_DESCSEQ";
257 case 93: return "R_ARM_THM_TLS_CALL";
258 case 94: return "R_ARM_PLT32_ABS";
259 case 95: return "R_ARM_GOT_ABS";
260 case 96: return "R_ARM_GOT_PREL";
261 case 97: return "R_ARM_GOT_BREL12";
262 case 98: return "R_ARM_GOTOFF12";
263 case 99: return "R_ARM_GOTRELAX";
264 case 100: return "R_ARM_GNU_VTENTRY";
265 case 101: return "R_ARM_GNU_VTINHERIT";
266 case 102: return "R_ARM_THM_JUMP11"; /* Also R_ARM_THM_PC11 */
267 case 103: return "R_ARM_THM_JUMP8"; /* Also R_ARM_THM_PC9 */
268 case 104: return "R_ARM_TLS_GD32";
269 case 105: return "R_ARM_TLS_LDM32";
270 case 106: return "R_ARM_TLS_LDO32";
271 case 107: return "R_ARM_TLS_IE32";
272 case 108: return "R_ARM_TLS_LE32";
273 case 109: return "R_ARM_TLS_LDO12";
274 case 110: return "R_ARM_TLS_LE12";
275 case 111: return "R_ARM_TLS_IE12GP";
276 /* 112-127 R_ARM_PRIVATE_<n> */
277 case 128: return "R_ARM_ME_TOO"; /* Obsolete */
278 case 129: return "R_ARM_THM_TLS_DESCSEQ16";
279 case 130: return "R_ARM_THM_TLS_DESCSEQ32";
280 case 131: return "R_ARM_THM_GOT_BREL12";
281 case 132: return "R_ARM_THM_ALU_ABS_G0_NC";
282 case 133: return "R_ARM_THM_ALU_ABS_G1_NC";
283 case 134: return "R_ARM_THM_ALU_ABS_G2_NC";
284 case 135: return "R_ARM_THM_ALU_ABS_G3";
285 /* 136-159 Reserved for future allocation. */
286 case 160: return "R_ARM_IRELATIVE";
287 /* 161-255 Reserved for future allocation. */
288 case 249: return "R_ARM_RXPC25";
289 case 250: return "R_ARM_RSBREL32";
290 case 251: return "R_ARM_THM_RPC22";
291 case 252: return "R_ARM_RREL32";
292 case 253: return "R_ARM_RABS32";
293 case 254: return "R_ARM_RPC24";
294 case 255: return "R_ARM_RBASE";
299 case 0: return "R_IA_64_NONE";
300 case 33: return "R_IA_64_IMM14";
301 case 34: return "R_IA_64_IMM22";
302 case 35: return "R_IA_64_IMM64";
303 case 36: return "R_IA_64_DIR32MSB";
304 case 37: return "R_IA_64_DIR32LSB";
305 case 38: return "R_IA_64_DIR64MSB";
306 case 39: return "R_IA_64_DIR64LSB";
307 case 42: return "R_IA_64_GPREL22";
308 case 43: return "R_IA_64_GPREL64I";
309 case 44: return "R_IA_64_GPREL32MSB";
310 case 45: return "R_IA_64_GPREL32LSB";
311 case 46: return "R_IA_64_GPREL64MSB";
312 case 47: return "R_IA_64_GPREL64LSB";
313 case 50: return "R_IA_64_LTOFF22";
314 case 51: return "R_IA_64_LTOFF64I";
315 case 58: return "R_IA_64_PLTOFF22";
316 case 59: return "R_IA_64_PLTOFF64I";
317 case 62: return "R_IA_64_PLTOFF64MSB";
318 case 63: return "R_IA_64_PLTOFF64LSB";
319 case 67: return "R_IA_64_FPTR64I";
320 case 68: return "R_IA_64_FPTR32MSB";
321 case 69: return "R_IA_64_FPTR32LSB";
322 case 70: return "R_IA_64_FPTR64MSB";
323 case 71: return "R_IA_64_FPTR64LSB";
324 case 72: return "R_IA_64_PCREL60B";
325 case 73: return "R_IA_64_PCREL21B";
326 case 74: return "R_IA_64_PCREL21M";
327 case 75: return "R_IA_64_PCREL21F";
328 case 76: return "R_IA_64_PCREL32MSB";
329 case 77: return "R_IA_64_PCREL32LSB";
330 case 78: return "R_IA_64_PCREL64MSB";
331 case 79: return "R_IA_64_PCREL64LSB";
332 case 82: return "R_IA_64_LTOFF_FPTR22";
333 case 83: return "R_IA_64_LTOFF_FPTR64I";
334 case 84: return "R_IA_64_LTOFF_FPTR32MSB";
335 case 85: return "R_IA_64_LTOFF_FPTR32LSB";
336 case 86: return "R_IA_64_LTOFF_FPTR64MSB";
337 case 87: return "R_IA_64_LTOFF_FPTR64LSB";
338 case 92: return "R_IA_64_SEGREL32MSB";
339 case 93: return "R_IA_64_SEGREL32LSB";
340 case 94: return "R_IA_64_SEGREL64MSB";
341 case 95: return "R_IA_64_SEGREL64LSB";
342 case 100: return "R_IA_64_SECREL32MSB";
343 case 101: return "R_IA_64_SECREL32LSB";
344 case 102: return "R_IA_64_SECREL64MSB";
345 case 103: return "R_IA_64_SECREL64LSB";
346 case 108: return "R_IA_64_REL32MSB";
347 case 109: return "R_IA_64_REL32LSB";
348 case 110: return "R_IA_64_REL64MSB";
349 case 111: return "R_IA_64_REL64LSB";
350 case 116: return "R_IA_64_LTV32MSB";
351 case 117: return "R_IA_64_LTV32LSB";
352 case 118: return "R_IA_64_LTV64MSB";
353 case 119: return "R_IA_64_LTV64LSB";
354 case 121: return "R_IA_64_PCREL21BI";
355 case 122: return "R_IA_64_PCREL22";
356 case 123: return "R_IA_64_PCREL64I";
357 case 128: return "R_IA_64_IPLTMSB";
358 case 129: return "R_IA_64_IPLTLSB";
359 case 133: return "R_IA_64_SUB";
360 case 134: return "R_IA_64_LTOFF22X";
361 case 135: return "R_IA_64_LDXMOV";
362 case 145: return "R_IA_64_TPREL14";
363 case 146: return "R_IA_64_TPREL22";
364 case 147: return "R_IA_64_TPREL64I";
365 case 150: return "R_IA_64_TPREL64MSB";
366 case 151: return "R_IA_64_TPREL64LSB";
367 case 154: return "R_IA_64_LTOFF_TPREL22";
368 case 166: return "R_IA_64_DTPMOD64MSB";
369 case 167: return "R_IA_64_DTPMOD64LSB";
370 case 170: return "R_IA_64_LTOFF_DTPMOD22";
371 case 177: return "R_IA_64_DTPREL14";
372 case 178: return "R_IA_64_DTPREL22";
373 case 179: return "R_IA_64_DTPREL64I";
374 case 180: return "R_IA_64_DTPREL32MSB";
375 case 181: return "R_IA_64_DTPREL32LSB";
376 case 182: return "R_IA_64_DTPREL64MSB";
377 case 183: return "R_IA_64_DTPREL64LSB";
378 case 186: return "R_IA_64_LTOFF_DTPREL22";
383 case 0: return "R_MIPS_NONE";
384 case 1: return "R_MIPS_16";
385 case 2: return "R_MIPS_32";
386 case 3: return "R_MIPS_REL32";
387 case 4: return "R_MIPS_26";
388 case 5: return "R_MIPS_HI16";
389 case 6: return "R_MIPS_LO16";
390 case 7: return "R_MIPS_GPREL16";
391 case 8: return "R_MIPS_LITERAL";
392 case 9: return "R_MIPS_GOT16";
393 case 10: return "R_MIPS_PC16";
394 case 11: return "R_MIPS_CALL16";
395 case 12: return "R_MIPS_GPREL32";
396 case 16: return "R_MIPS_SHIFT5";
397 case 17: return "R_MIPS_SHIFT6";
398 case 18: return "R_MIPS_64";
399 case 19: return "R_MIPS_GOT_DISP";
400 case 20: return "R_MIPS_GOT_PAGE";
401 case 21: return "R_MIPS_GOT_OFST";
402 case 22: return "R_MIPS_GOT_HI16";
403 case 23: return "R_MIPS_GOT_LO16";
404 case 24: return "R_MIPS_SUB";
405 case 30: return "R_MIPS_CALLHI16";
406 case 31: return "R_MIPS_CALLLO16";
407 case 37: return "R_MIPS_JALR";
408 case 38: return "R_MIPS_TLS_DTPMOD32";
409 case 39: return "R_MIPS_TLS_DTPREL32";
410 case 40: return "R_MIPS_TLS_DTPMOD64";
411 case 41: return "R_MIPS_TLS_DTPREL64";
412 case 42: return "R_MIPS_TLS_GD";
413 case 43: return "R_MIPS_TLS_LDM";
414 case 44: return "R_MIPS_TLS_DTPREL_HI16";
415 case 45: return "R_MIPS_TLS_DTPREL_LO16";
416 case 46: return "R_MIPS_TLS_GOTTPREL";
417 case 47: return "R_MIPS_TLS_TPREL32";
418 case 48: return "R_MIPS_TLS_TPREL64";
419 case 49: return "R_MIPS_TLS_TPREL_HI16";
420 case 50: return "R_MIPS_TLS_TPREL_LO16";
425 case 0: return "R_PPC_NONE";
426 case 1: return "R_PPC_ADDR32";
427 case 2: return "R_PPC_ADDR24";
428 case 3: return "R_PPC_ADDR16";
429 case 4: return "R_PPC_ADDR16_LO";
430 case 5: return "R_PPC_ADDR16_HI";
431 case 6: return "R_PPC_ADDR16_HA";
432 case 7: return "R_PPC_ADDR14";
433 case 8: return "R_PPC_ADDR14_BRTAKEN";
434 case 9: return "R_PPC_ADDR14_BRNTAKEN";
435 case 10: return "R_PPC_REL24";
436 case 11: return "R_PPC_REL14";
437 case 12: return "R_PPC_REL14_BRTAKEN";
438 case 13: return "R_PPC_REL14_BRNTAKEN";
439 case 14: return "R_PPC_GOT16";
440 case 15: return "R_PPC_GOT16_LO";
441 case 16: return "R_PPC_GOT16_HI";
442 case 17: return "R_PPC_GOT16_HA";
443 case 18: return "R_PPC_PLTREL24";
444 case 19: return "R_PPC_COPY";
445 case 20: return "R_PPC_GLOB_DAT";
446 case 21: return "R_PPC_JMP_SLOT";
447 case 22: return "R_PPC_RELATIVE";
448 case 23: return "R_PPC_LOCAL24PC";
449 case 24: return "R_PPC_UADDR32";
450 case 25: return "R_PPC_UADDR16";
451 case 26: return "R_PPC_REL32";
452 case 27: return "R_PPC_PLT32";
453 case 28: return "R_PPC_PLTREL32";
454 case 29: return "R_PPC_PLT16_LO";
455 case 30: return "R_PPC_PLT16_HI";
456 case 31: return "R_PPC_PLT16_HA";
457 case 32: return "R_PPC_SDAREL16";
458 case 33: return "R_PPC_SECTOFF";
459 case 34: return "R_PPC_SECTOFF_LO";
460 case 35: return "R_PPC_SECTOFF_HI";
461 case 36: return "R_PPC_SECTOFF_HA";
462 case 67: return "R_PPC_TLS";
463 case 68: return "R_PPC_DTPMOD32";
464 case 69: return "R_PPC_TPREL16";
465 case 70: return "R_PPC_TPREL16_LO";
466 case 71: return "R_PPC_TPREL16_HI";
467 case 72: return "R_PPC_TPREL16_HA";
468 case 73: return "R_PPC_TPREL32";
469 case 74: return "R_PPC_DTPREL16";
470 case 75: return "R_PPC_DTPREL16_LO";
471 case 76: return "R_PPC_DTPREL16_HI";
472 case 77: return "R_PPC_DTPREL16_HA";
473 case 78: return "R_PPC_DTPREL32";
474 case 79: return "R_PPC_GOT_TLSGD16";
475 case 80: return "R_PPC_GOT_TLSGD16_LO";
476 case 81: return "R_PPC_GOT_TLSGD16_HI";
477 case 82: return "R_PPC_GOT_TLSGD16_HA";
478 case 83: return "R_PPC_GOT_TLSLD16";
479 case 84: return "R_PPC_GOT_TLSLD16_LO";
480 case 85: return "R_PPC_GOT_TLSLD16_HI";
481 case 86: return "R_PPC_GOT_TLSLD16_HA";
482 case 87: return "R_PPC_GOT_TPREL16";
483 case 88: return "R_PPC_GOT_TPREL16_LO";
484 case 89: return "R_PPC_GOT_TPREL16_HI";
485 case 90: return "R_PPC_GOT_TPREL16_HA";
486 case 101: return "R_PPC_EMB_NADDR32";
487 case 102: return "R_PPC_EMB_NADDR16";
488 case 103: return "R_PPC_EMB_NADDR16_LO";
489 case 104: return "R_PPC_EMB_NADDR16_HI";
490 case 105: return "R_PPC_EMB_NADDR16_HA";
491 case 106: return "R_PPC_EMB_SDAI16";
492 case 107: return "R_PPC_EMB_SDA2I16";
493 case 108: return "R_PPC_EMB_SDA2REL";
494 case 109: return "R_PPC_EMB_SDA21";
495 case 110: return "R_PPC_EMB_MRKREF";
496 case 111: return "R_PPC_EMB_RELSEC16";
497 case 112: return "R_PPC_EMB_RELST_LO";
498 case 113: return "R_PPC_EMB_RELST_HI";
499 case 114: return "R_PPC_EMB_RELST_HA";
500 case 115: return "R_PPC_EMB_BIT_FLD";
501 case 116: return "R_PPC_EMB_RELSDA";
506 case 0: return "R_PPC64_NONE";
507 case 1: return "R_PPC64_ADDR32";
508 case 2: return "R_PPC64_ADDR24";
509 case 3: return "R_PPC64_ADDR16";
510 case 4: return "R_PPC64_ADDR16_LO";
511 case 5: return "R_PPC64_ADDR16_HI";
512 case 6: return "R_PPC64_ADDR16_HA";
513 case 7: return "R_PPC64_ADDR14";
514 case 8: return "R_PPC64_ADDR14_BRTAKEN";
515 case 9: return "R_PPC64_ADDR14_BRNTAKEN";
516 case 10: return "R_PPC64_REL24";
517 case 11: return "R_PPC64_REL14";
518 case 12: return "R_PPC64_REL14_BRTAKEN";
519 case 13: return "R_PPC64_REL14_BRNTAKEN";
520 case 14: return "R_PPC64_GOT16";
521 case 15: return "R_PPC64_GOT16_LO";
522 case 16: return "R_PPC64_GOT16_HI";
523 case 17: return "R_PPC64_GOT16_HA";
524 case 19: return "R_PPC64_COPY";
525 case 20: return "R_PPC64_GLOB_DAT";
526 case 21: return "R_PPC64_JMP_SLOT";
527 case 22: return "R_PPC64_RELATIVE";
528 case 24: return "R_PPC64_UADDR32";
529 case 25: return "R_PPC64_UADDR16";
530 case 26: return "R_PPC64_REL32";
531 case 27: return "R_PPC64_PLT32";
532 case 28: return "R_PPC64_PLTREL32";
533 case 29: return "R_PPC64_PLT16_LO";
534 case 30: return "R_PPC64_PLT16_HI";
535 case 31: return "R_PPC64_PLT16_HA";
536 case 33: return "R_PPC64_SECTOFF";
537 case 34: return "R_PPC64_SECTOFF_LO";
538 case 35: return "R_PPC64_SECTOFF_HI";
539 case 36: return "R_PPC64_SECTOFF_HA";
540 case 37: return "R_PPC64_ADDR30";
541 case 38: return "R_PPC64_ADDR64";
542 case 39: return "R_PPC64_ADDR16_HIGHER";
543 case 40: return "R_PPC64_ADDR16_HIGHERA";
544 case 41: return "R_PPC64_ADDR16_HIGHEST";
545 case 42: return "R_PPC64_ADDR16_HIGHESTA";
546 case 43: return "R_PPC64_UADDR64";
547 case 44: return "R_PPC64_REL64";
548 case 45: return "R_PPC64_PLT64";
549 case 46: return "R_PPC64_PLTREL64";
550 case 47: return "R_PPC64_TOC16";
551 case 48: return "R_PPC64_TOC16_LO";
552 case 49: return "R_PPC64_TOC16_HI";
553 case 50: return "R_PPC64_TOC16_HA";
554 case 51: return "R_PPC64_TOC";
555 case 52: return "R_PPC64_PLTGOT16";
556 case 53: return "R_PPC64_PLTGOT16_LO";
557 case 54: return "R_PPC64_PLTGOT16_HI";
558 case 55: return "R_PPC64_PLTGOT16_HA";
559 case 56: return "R_PPC64_ADDR16_DS";
560 case 57: return "R_PPC64_ADDR16_LO_DS";
561 case 58: return "R_PPC64_GOT16_DS";
562 case 59: return "R_PPC64_GOT16_LO_DS";
563 case 60: return "R_PPC64_PLT16_LO_DS";
564 case 61: return "R_PPC64_SECTOFF_DS";
565 case 62: return "R_PPC64_SECTOFF_LO_DS";
566 case 63: return "R_PPC64_TOC16_DS";
567 case 64: return "R_PPC64_TOC16_LO_DS";
568 case 65: return "R_PPC64_PLTGOT16_DS";
569 case 66: return "R_PPC64_PLTGOT16_LO_DS";
570 case 67: return "R_PPC64_TLS";
571 case 68: return "R_PPC64_DTPMOD64";
572 case 69: return "R_PPC64_TPREL16";
573 case 70: return "R_PPC64_TPREL16_LO";
574 case 71: return "R_PPC64_TPREL16_HI";
575 case 72: return "R_PPC64_TPREL16_HA";
576 case 73: return "R_PPC64_TPREL64";
577 case 74: return "R_PPC64_DTPREL16";
578 case 75: return "R_PPC64_DTPREL16_LO";
579 case 76: return "R_PPC64_DTPREL16_HI";
580 case 77: return "R_PPC64_DTPREL16_HA";
581 case 78: return "R_PPC64_DTPREL64";
582 case 79: return "R_PPC64_GOT_TLSGD16";
583 case 80: return "R_PPC64_GOT_TLSGD16_LO";
584 case 81: return "R_PPC64_GOT_TLSGD16_HI";
585 case 82: return "R_PPC64_GOT_TLSGD16_HA";
586 case 83: return "R_PPC64_GOT_TLSLD16";
587 case 84: return "R_PPC64_GOT_TLSLD16_LO";
588 case 85: return "R_PPC64_GOT_TLSLD16_HI";
589 case 86: return "R_PPC64_GOT_TLSLD16_HA";
590 case 87: return "R_PPC64_GOT_TPREL16_DS";
591 case 88: return "R_PPC64_GOT_TPREL16_LO_DS";
592 case 89: return "R_PPC64_GOT_TPREL16_HI";
593 case 90: return "R_PPC64_GOT_TPREL16_HA";
594 case 91: return "R_PPC64_GOT_DTPREL16_DS";
595 case 92: return "R_PPC64_GOT_DTPREL16_LO_DS";
596 case 93: return "R_PPC64_GOT_DTPREL16_HI";
597 case 94: return "R_PPC64_GOT_DTPREL16_HA";
598 case 95: return "R_PPC64_TPREL16_DS";
599 case 96: return "R_PPC64_TPREL16_LO_DS";
600 case 97: return "R_PPC64_TPREL16_HIGHER";
601 case 98: return "R_PPC64_TPREL16_HIGHERA";
602 case 99: return "R_PPC64_TPREL16_HIGHEST";
603 case 100: return "R_PPC64_TPREL16_HIGHESTA";
604 case 101: return "R_PPC64_DTPREL16_DS";
605 case 102: return "R_PPC64_DTPREL16_LO_DS";
606 case 103: return "R_PPC64_DTPREL16_HIGHER";
607 case 104: return "R_PPC64_DTPREL16_HIGHERA";
608 case 105: return "R_PPC64_DTPREL16_HIGHEST";
609 case 106: return "R_PPC64_DTPREL16_HIGHESTA";
610 case 107: return "R_PPC64_TLSGD";
611 case 108: return "R_PPC64_TLSLD";
612 case 249: return "R_PPC64_REL16";
613 case 250: return "R_PPC64_REL16_LO";
614 case 251: return "R_PPC64_REL16_HI";
615 case 252: return "R_PPC64_REL16_HA";
620 case 0: return "R_RISCV_NONE";
621 case 1: return "R_RISCV_32";
622 case 2: return "R_RISCV_64";
623 case 3: return "R_RISCV_RELATIVE";
624 case 4: return "R_RISCV_COPY";
625 case 5: return "R_RISCV_JUMP_SLOT";
626 case 6: return "R_RISCV_TLS_DTPMOD32";
627 case 7: return "R_RISCV_TLS_DTPMOD64";
628 case 8: return "R_RISCV_TLS_DTPREL32";
629 case 9: return "R_RISCV_TLS_DTPREL64";
630 case 10: return "R_RISCV_TLS_TPREL32";
631 case 11: return "R_RISCV_TLS_TPREL64";
632 case 16: return "R_RISCV_BRANCH";
633 case 17: return "R_RISCV_JAL";
634 case 18: return "R_RISCV_CALL";
635 case 19: return "R_RISCV_CALL_PLT";
636 case 20: return "R_RISCV_GOT_HI20";
637 case 21: return "R_RISCV_TLS_GOT_HI20";
638 case 22: return "R_RISCV_TLS_GD_HI20";
639 case 23: return "R_RISCV_PCREL_HI20";
640 case 24: return "R_RISCV_PCREL_LO12_I";
641 case 25: return "R_RISCV_PCREL_LO12_S";
642 case 26: return "R_RISCV_HI20";
643 case 27: return "R_RISCV_LO12_I";
644 case 28: return "R_RISCV_LO12_S";
645 case 29: return "R_RISCV_TPREL_HI20";
646 case 30: return "R_RISCV_TPREL_LO12_I";
647 case 31: return "R_RISCV_TPREL_LO12_S";
648 case 32: return "R_RISCV_TPREL_ADD";
649 case 33: return "R_RISCV_ADD8";
650 case 34: return "R_RISCV_ADD16";
651 case 35: return "R_RISCV_ADD32";
652 case 36: return "R_RISCV_ADD64";
653 case 37: return "R_RISCV_SUB8";
654 case 38: return "R_RISCV_SUB16";
655 case 39: return "R_RISCV_SUB32";
656 case 40: return "R_RISCV_SUB64";
657 case 41: return "R_RISCV_GNU_VTINHERIT";
658 case 42: return "R_RISCV_GNU_VTENTRY";
659 case 43: return "R_RISCV_ALIGN";
660 case 44: return "R_RISCV_RVC_BRANCH";
661 case 45: return "R_RISCV_RVC_JUMP";
662 case 46: return "R_RISCV_RVC_LUI";
663 case 47: return "R_RISCV_GPREL_I";
664 case 48: return "R_RISCV_GPREL_S";
669 case 0: return "R_390_NONE";
670 case 1: return "R_390_8";
671 case 2: return "R_390_12";
672 case 3: return "R_390_16";
673 case 4: return "R_390_32";
674 case 5: return "R_390_PC32";
675 case 6: return "R_390_GOT12";
676 case 7: return "R_390_GOT32";
677 case 8: return "R_390_PLT32";
678 case 9: return "R_390_COPY";
679 case 10: return "R_390_GLOB_DAT";
680 case 11: return "R_390_JMP_SLOT";
681 case 12: return "R_390_RELATIVE";
682 case 13: return "R_390_GOTOFF";
683 case 14: return "R_390_GOTPC";
684 case 15: return "R_390_GOT16";
685 case 16: return "R_390_PC16";
686 case 17: return "R_390_PC16DBL";
687 case 18: return "R_390_PLT16DBL";
688 case 19: return "R_390_PC32DBL";
689 case 20: return "R_390_PLT32DBL";
690 case 21: return "R_390_GOTPCDBL";
691 case 22: return "R_390_64";
692 case 23: return "R_390_PC64";
693 case 24: return "R_390_GOT64";
694 case 25: return "R_390_PLT64";
695 case 26: return "R_390_GOTENT";
701 case 0: return "R_SPARC_NONE";
702 case 1: return "R_SPARC_8";
703 case 2: return "R_SPARC_16";
704 case 3: return "R_SPARC_32";
705 case 4: return "R_SPARC_DISP8";
706 case 5: return "R_SPARC_DISP16";
707 case 6: return "R_SPARC_DISP32";
708 case 7: return "R_SPARC_WDISP30";
709 case 8: return "R_SPARC_WDISP22";
710 case 9: return "R_SPARC_HI22";
711 case 10: return "R_SPARC_22";
712 case 11: return "R_SPARC_13";
713 case 12: return "R_SPARC_LO10";
714 case 13: return "R_SPARC_GOT10";
715 case 14: return "R_SPARC_GOT13";
716 case 15: return "R_SPARC_GOT22";
717 case 16: return "R_SPARC_PC10";
718 case 17: return "R_SPARC_PC22";
719 case 18: return "R_SPARC_WPLT30";
720 case 19: return "R_SPARC_COPY";
721 case 20: return "R_SPARC_GLOB_DAT";
722 case 21: return "R_SPARC_JMP_SLOT";
723 case 22: return "R_SPARC_RELATIVE";
724 case 23: return "R_SPARC_UA32";
725 case 24: return "R_SPARC_PLT32";
726 case 25: return "R_SPARC_HIPLT22";
727 case 26: return "R_SPARC_LOPLT10";
728 case 27: return "R_SPARC_PCPLT32";
729 case 28: return "R_SPARC_PCPLT22";
730 case 29: return "R_SPARC_PCPLT10";
731 case 30: return "R_SPARC_10";
732 case 31: return "R_SPARC_11";
733 case 32: return "R_SPARC_64";
734 case 33: return "R_SPARC_OLO10";
735 case 34: return "R_SPARC_HH22";
736 case 35: return "R_SPARC_HM10";
737 case 36: return "R_SPARC_LM22";
738 case 37: return "R_SPARC_PC_HH22";
739 case 38: return "R_SPARC_PC_HM10";
740 case 39: return "R_SPARC_PC_LM22";
741 case 40: return "R_SPARC_WDISP16";
742 case 41: return "R_SPARC_WDISP19";
743 case 42: return "R_SPARC_GLOB_JMP";
744 case 43: return "R_SPARC_7";
745 case 44: return "R_SPARC_5";
746 case 45: return "R_SPARC_6";
747 case 46: return "R_SPARC_DISP64";
748 case 47: return "R_SPARC_PLT64";
749 case 48: return "R_SPARC_HIX22";
750 case 49: return "R_SPARC_LOX10";
751 case 50: return "R_SPARC_H44";
752 case 51: return "R_SPARC_M44";
753 case 52: return "R_SPARC_L44";
754 case 53: return "R_SPARC_REGISTER";
755 case 54: return "R_SPARC_UA64";
756 case 55: return "R_SPARC_UA16";
757 case 56: return "R_SPARC_TLS_GD_HI22";
758 case 57: return "R_SPARC_TLS_GD_LO10";
759 case 58: return "R_SPARC_TLS_GD_ADD";
760 case 59: return "R_SPARC_TLS_GD_CALL";
761 case 60: return "R_SPARC_TLS_LDM_HI22";
762 case 61: return "R_SPARC_TLS_LDM_LO10";
763 case 62: return "R_SPARC_TLS_LDM_ADD";
764 case 63: return "R_SPARC_TLS_LDM_CALL";
765 case 64: return "R_SPARC_TLS_LDO_HIX22";
766 case 65: return "R_SPARC_TLS_LDO_LOX10";
767 case 66: return "R_SPARC_TLS_LDO_ADD";
768 case 67: return "R_SPARC_TLS_IE_HI22";
769 case 68: return "R_SPARC_TLS_IE_LO10";
770 case 69: return "R_SPARC_TLS_IE_LD";
771 case 70: return "R_SPARC_TLS_IE_LDX";
772 case 71: return "R_SPARC_TLS_IE_ADD";
773 case 72: return "R_SPARC_TLS_LE_HIX22";
774 case 73: return "R_SPARC_TLS_LE_LOX10";
775 case 74: return "R_SPARC_TLS_DTPMOD32";
776 case 75: return "R_SPARC_TLS_DTPMOD64";
777 case 76: return "R_SPARC_TLS_DTPOFF32";
778 case 77: return "R_SPARC_TLS_DTPOFF64";
779 case 78: return "R_SPARC_TLS_TPOFF32";
780 case 79: return "R_SPARC_TLS_TPOFF64";
785 case 0: return "R_X86_64_NONE";
786 case 1: return "R_X86_64_64";
787 case 2: return "R_X86_64_PC32";
788 case 3: return "R_X86_64_GOT32";
789 case 4: return "R_X86_64_PLT32";
790 case 5: return "R_X86_64_COPY";
791 case 6: return "R_X86_64_GLOB_DAT";
792 case 7: return "R_X86_64_JUMP_SLOT";
793 case 8: return "R_X86_64_RELATIVE";
794 case 9: return "R_X86_64_GOTPCREL";
795 case 10: return "R_X86_64_32";
796 case 11: return "R_X86_64_32S";
797 case 12: return "R_X86_64_16";
798 case 13: return "R_X86_64_PC16";
799 case 14: return "R_X86_64_8";
800 case 15: return "R_X86_64_PC8";
801 case 16: return "R_X86_64_DTPMOD64";
802 case 17: return "R_X86_64_DTPOFF64";
803 case 18: return "R_X86_64_TPOFF64";
804 case 19: return "R_X86_64_TLSGD";
805 case 20: return "R_X86_64_TLSLD";
806 case 21: return "R_X86_64_DTPOFF32";
807 case 22: return "R_X86_64_GOTTPOFF";
808 case 23: return "R_X86_64_TPOFF32";
809 case 24: return "R_X86_64_PC64";
810 case 25: return "R_X86_64_GOTOFF64";
811 case 26: return "R_X86_64_GOTPC32";
812 case 27: return "R_X86_64_GOT64";
813 case 28: return "R_X86_64_GOTPCREL64";
814 case 29: return "R_X86_64_GOTPC64";
815 case 30: return "R_X86_64_GOTPLT64";
816 case 31: return "R_X86_64_PLTOFF64";
817 case 32: return "R_X86_64_SIZE32";
818 case 33: return "R_X86_64_SIZE64";
819 case 34: return "R_X86_64_GOTPC32_TLSDESC";
820 case 35: return "R_X86_64_TLSDESC_CALL";
821 case 36: return "R_X86_64_TLSDESC";
822 case 37: return "R_X86_64_IRELATIVE";
823 case 38: return "R_X86_64_RELATIVE64";
824 case 41: return "R_X86_64_GOTPCRELX";
825 case 42: return "R_X86_64_REX_GOTPCRELX";
830 snprintf(s_type, sizeof(s_type), "<unknown: %#x>", type);