1
44
45 package elf
46
47 import "strconv"
48
49
52
53
54 const (
55 EI_CLASS = 4
56 EI_DATA = 5
57 EI_VERSION = 6
58 EI_OSABI = 7
59 EI_ABIVERSION = 8
60 EI_PAD = 9
61 EI_NIDENT = 16
62 )
63
64
65 const ELFMAG = "\177ELF"
66
67
68 type Version byte
69
70 const (
71 EV_NONE Version = 0
72 EV_CURRENT Version = 1
73 )
74
75 var versionStrings = []intName{
76 {0, "EV_NONE"},
77 {1, "EV_CURRENT"},
78 }
79
80 func (i Version) String() string { return stringName(uint32(i), versionStrings, false) }
81 func (i Version) GoString() string { return stringName(uint32(i), versionStrings, true) }
82
83
84 type Class byte
85
86 const (
87 ELFCLASSNONE Class = 0
88 ELFCLASS32 Class = 1
89 ELFCLASS64 Class = 2
90 )
91
92 var classStrings = []intName{
93 {0, "ELFCLASSNONE"},
94 {1, "ELFCLASS32"},
95 {2, "ELFCLASS64"},
96 }
97
98 func (i Class) String() string { return stringName(uint32(i), classStrings, false) }
99 func (i Class) GoString() string { return stringName(uint32(i), classStrings, true) }
100
101
102 type Data byte
103
104 const (
105 ELFDATANONE Data = 0
106 ELFDATA2LSB Data = 1
107 ELFDATA2MSB Data = 2
108 )
109
110 var dataStrings = []intName{
111 {0, "ELFDATANONE"},
112 {1, "ELFDATA2LSB"},
113 {2, "ELFDATA2MSB"},
114 }
115
116 func (i Data) String() string { return stringName(uint32(i), dataStrings, false) }
117 func (i Data) GoString() string { return stringName(uint32(i), dataStrings, true) }
118
119
120 type OSABI byte
121
122 const (
123 ELFOSABI_NONE OSABI = 0
124 ELFOSABI_HPUX OSABI = 1
125 ELFOSABI_NETBSD OSABI = 2
126 ELFOSABI_LINUX OSABI = 3
127 ELFOSABI_HURD OSABI = 4
128 ELFOSABI_86OPEN OSABI = 5
129 ELFOSABI_SOLARIS OSABI = 6
130 ELFOSABI_AIX OSABI = 7
131 ELFOSABI_IRIX OSABI = 8
132 ELFOSABI_FREEBSD OSABI = 9
133 ELFOSABI_TRU64 OSABI = 10
134 ELFOSABI_MODESTO OSABI = 11
135 ELFOSABI_OPENBSD OSABI = 12
136 ELFOSABI_OPENVMS OSABI = 13
137 ELFOSABI_NSK OSABI = 14
138 ELFOSABI_AROS OSABI = 15
139 ELFOSABI_FENIXOS OSABI = 16
140 ELFOSABI_CLOUDABI OSABI = 17
141 ELFOSABI_ARM OSABI = 97
142 ELFOSABI_STANDALONE OSABI = 255
143 )
144
145 var osabiStrings = []intName{
146 {0, "ELFOSABI_NONE"},
147 {1, "ELFOSABI_HPUX"},
148 {2, "ELFOSABI_NETBSD"},
149 {3, "ELFOSABI_LINUX"},
150 {4, "ELFOSABI_HURD"},
151 {5, "ELFOSABI_86OPEN"},
152 {6, "ELFOSABI_SOLARIS"},
153 {7, "ELFOSABI_AIX"},
154 {8, "ELFOSABI_IRIX"},
155 {9, "ELFOSABI_FREEBSD"},
156 {10, "ELFOSABI_TRU64"},
157 {11, "ELFOSABI_MODESTO"},
158 {12, "ELFOSABI_OPENBSD"},
159 {13, "ELFOSABI_OPENVMS"},
160 {14, "ELFOSABI_NSK"},
161 {15, "ELFOSABI_AROS"},
162 {16, "ELFOSABI_FENIXOS"},
163 {17, "ELFOSABI_CLOUDABI"},
164 {97, "ELFOSABI_ARM"},
165 {255, "ELFOSABI_STANDALONE"},
166 }
167
168 func (i OSABI) String() string { return stringName(uint32(i), osabiStrings, false) }
169 func (i OSABI) GoString() string { return stringName(uint32(i), osabiStrings, true) }
170
171
172 type Type uint16
173
174 const (
175 ET_NONE Type = 0
176 ET_REL Type = 1
177 ET_EXEC Type = 2
178 ET_DYN Type = 3
179 ET_CORE Type = 4
180 ET_LOOS Type = 0xfe00
181 ET_HIOS Type = 0xfeff
182 ET_LOPROC Type = 0xff00
183 ET_HIPROC Type = 0xffff
184 )
185
186 var typeStrings = []intName{
187 {0, "ET_NONE"},
188 {1, "ET_REL"},
189 {2, "ET_EXEC"},
190 {3, "ET_DYN"},
191 {4, "ET_CORE"},
192 {0xfe00, "ET_LOOS"},
193 {0xfeff, "ET_HIOS"},
194 {0xff00, "ET_LOPROC"},
195 {0xffff, "ET_HIPROC"},
196 }
197
198 func (i Type) String() string { return stringName(uint32(i), typeStrings, false) }
199 func (i Type) GoString() string { return stringName(uint32(i), typeStrings, true) }
200
201
202 type Machine uint16
203
204 const (
205 EM_NONE Machine = 0
206 EM_M32 Machine = 1
207 EM_SPARC Machine = 2
208 EM_386 Machine = 3
209 EM_68K Machine = 4
210 EM_88K Machine = 5
211 EM_860 Machine = 7
212 EM_MIPS Machine = 8
213 EM_S370 Machine = 9
214 EM_MIPS_RS3_LE Machine = 10
215 EM_PARISC Machine = 15
216 EM_VPP500 Machine = 17
217 EM_SPARC32PLUS Machine = 18
218 EM_960 Machine = 19
219 EM_PPC Machine = 20
220 EM_PPC64 Machine = 21
221 EM_S390 Machine = 22
222 EM_V800 Machine = 36
223 EM_FR20 Machine = 37
224 EM_RH32 Machine = 38
225 EM_RCE Machine = 39
226 EM_ARM Machine = 40
227 EM_SH Machine = 42
228 EM_SPARCV9 Machine = 43
229 EM_TRICORE Machine = 44
230 EM_ARC Machine = 45
231 EM_H8_300 Machine = 46
232 EM_H8_300H Machine = 47
233 EM_H8S Machine = 48
234 EM_H8_500 Machine = 49
235 EM_IA_64 Machine = 50
236 EM_MIPS_X Machine = 51
237 EM_COLDFIRE Machine = 52
238 EM_68HC12 Machine = 53
239 EM_MMA Machine = 54
240 EM_PCP Machine = 55
241 EM_NCPU Machine = 56
242 EM_NDR1 Machine = 57
243 EM_STARCORE Machine = 58
244 EM_ME16 Machine = 59
245 EM_ST100 Machine = 60
246 EM_TINYJ Machine = 61
247 EM_X86_64 Machine = 62
248 EM_PDSP Machine = 63
249 EM_PDP10 Machine = 64
250 EM_PDP11 Machine = 65
251 EM_FX66 Machine = 66
252 EM_ST9PLUS Machine = 67
253 EM_ST7 Machine = 68
254 EM_68HC16 Machine = 69
255 EM_68HC11 Machine = 70
256 EM_68HC08 Machine = 71
257 EM_68HC05 Machine = 72
258 EM_SVX Machine = 73
259 EM_ST19 Machine = 74
260 EM_VAX Machine = 75
261 EM_CRIS Machine = 76
262 EM_JAVELIN Machine = 77
263 EM_FIREPATH Machine = 78
264 EM_ZSP Machine = 79
265 EM_MMIX Machine = 80
266 EM_HUANY Machine = 81
267 EM_PRISM Machine = 82
268 EM_AVR Machine = 83
269 EM_FR30 Machine = 84
270 EM_D10V Machine = 85
271 EM_D30V Machine = 86
272 EM_V850 Machine = 87
273 EM_M32R Machine = 88
274 EM_MN10300 Machine = 89
275 EM_MN10200 Machine = 90
276 EM_PJ Machine = 91
277 EM_OPENRISC Machine = 92
278 EM_ARC_COMPACT Machine = 93
279 EM_XTENSA Machine = 94
280 EM_VIDEOCORE Machine = 95
281 EM_TMM_GPP Machine = 96
282 EM_NS32K Machine = 97
283 EM_TPC Machine = 98
284 EM_SNP1K Machine = 99
285 EM_ST200 Machine = 100
286 EM_IP2K Machine = 101
287 EM_MAX Machine = 102
288 EM_CR Machine = 103
289 EM_F2MC16 Machine = 104
290 EM_MSP430 Machine = 105
291 EM_BLACKFIN Machine = 106
292 EM_SE_C33 Machine = 107
293 EM_SEP Machine = 108
294 EM_ARCA Machine = 109
295 EM_UNICORE Machine = 110
296 EM_EXCESS Machine = 111
297 EM_DXP Machine = 112
298 EM_ALTERA_NIOS2 Machine = 113
299 EM_CRX Machine = 114
300 EM_XGATE Machine = 115
301 EM_C166 Machine = 116
302 EM_M16C Machine = 117
303 EM_DSPIC30F Machine = 118
304 EM_CE Machine = 119
305 EM_M32C Machine = 120
306 EM_TSK3000 Machine = 131
307 EM_RS08 Machine = 132
308 EM_SHARC Machine = 133
309 EM_ECOG2 Machine = 134
310 EM_SCORE7 Machine = 135
311 EM_DSP24 Machine = 136
312 EM_VIDEOCORE3 Machine = 137
313 EM_LATTICEMICO32 Machine = 138
314 EM_SE_C17 Machine = 139
315 EM_TI_C6000 Machine = 140
316 EM_TI_C2000 Machine = 141
317 EM_TI_C5500 Machine = 142
318 EM_TI_ARP32 Machine = 143
319 EM_TI_PRU Machine = 144
320 EM_MMDSP_PLUS Machine = 160
321 EM_CYPRESS_M8C Machine = 161
322 EM_R32C Machine = 162
323 EM_TRIMEDIA Machine = 163
324 EM_QDSP6 Machine = 164
325 EM_8051 Machine = 165
326 EM_STXP7X Machine = 166
327 EM_NDS32 Machine = 167
328 EM_ECOG1 Machine = 168
329 EM_ECOG1X Machine = 168
330 EM_MAXQ30 Machine = 169
331 EM_XIMO16 Machine = 170
332 EM_MANIK Machine = 171
333 EM_CRAYNV2 Machine = 172
334 EM_RX Machine = 173
335 EM_METAG Machine = 174
336 EM_MCST_ELBRUS Machine = 175
337 EM_ECOG16 Machine = 176
338 EM_CR16 Machine = 177
339 EM_ETPU Machine = 178
340 EM_SLE9X Machine = 179
341 EM_L10M Machine = 180
342 EM_K10M Machine = 181
343 EM_AARCH64 Machine = 183
344 EM_AVR32 Machine = 185
345 EM_STM8 Machine = 186
346 EM_TILE64 Machine = 187
347 EM_TILEPRO Machine = 188
348 EM_MICROBLAZE Machine = 189
349 EM_CUDA Machine = 190
350 EM_TILEGX Machine = 191
351 EM_CLOUDSHIELD Machine = 192
352 EM_COREA_1ST Machine = 193
353 EM_COREA_2ND Machine = 194
354 EM_ARC_COMPACT2 Machine = 195
355 EM_OPEN8 Machine = 196
356 EM_RL78 Machine = 197
357 EM_VIDEOCORE5 Machine = 198
358 EM_78KOR Machine = 199
359 EM_56800EX Machine = 200
360 EM_BA1 Machine = 201
361 EM_BA2 Machine = 202
362 EM_XCORE Machine = 203
363 EM_MCHP_PIC Machine = 204
364 EM_INTEL205 Machine = 205
365 EM_INTEL206 Machine = 206
366 EM_INTEL207 Machine = 207
367 EM_INTEL208 Machine = 208
368 EM_INTEL209 Machine = 209
369 EM_KM32 Machine = 210
370 EM_KMX32 Machine = 211
371 EM_KMX16 Machine = 212
372 EM_KMX8 Machine = 213
373 EM_KVARC Machine = 214
374 EM_CDP Machine = 215
375 EM_COGE Machine = 216
376 EM_COOL Machine = 217
377 EM_NORC Machine = 218
378 EM_CSR_KALIMBA Machine = 219
379 EM_Z80 Machine = 220
380 EM_VISIUM Machine = 221
381 EM_FT32 Machine = 222
382 EM_MOXIE Machine = 223
383 EM_AMDGPU Machine = 224
384 EM_RISCV Machine = 243
385 EM_LANAI Machine = 244
386 EM_BPF Machine = 247
387
388
389 EM_486 Machine = 6
390 EM_MIPS_RS4_BE Machine = 10
391 EM_ALPHA_STD Machine = 41
392 EM_ALPHA Machine = 0x9026
393 )
394
395 var machineStrings = []intName{
396 {0, "EM_NONE"},
397 {1, "EM_M32"},
398 {2, "EM_SPARC"},
399 {3, "EM_386"},
400 {4, "EM_68K"},
401 {5, "EM_88K"},
402 {7, "EM_860"},
403 {8, "EM_MIPS"},
404 {9, "EM_S370"},
405 {10, "EM_MIPS_RS3_LE"},
406 {15, "EM_PARISC"},
407 {17, "EM_VPP500"},
408 {18, "EM_SPARC32PLUS"},
409 {19, "EM_960"},
410 {20, "EM_PPC"},
411 {21, "EM_PPC64"},
412 {22, "EM_S390"},
413 {36, "EM_V800"},
414 {37, "EM_FR20"},
415 {38, "EM_RH32"},
416 {39, "EM_RCE"},
417 {40, "EM_ARM"},
418 {42, "EM_SH"},
419 {43, "EM_SPARCV9"},
420 {44, "EM_TRICORE"},
421 {45, "EM_ARC"},
422 {46, "EM_H8_300"},
423 {47, "EM_H8_300H"},
424 {48, "EM_H8S"},
425 {49, "EM_H8_500"},
426 {50, "EM_IA_64"},
427 {51, "EM_MIPS_X"},
428 {52, "EM_COLDFIRE"},
429 {53, "EM_68HC12"},
430 {54, "EM_MMA"},
431 {55, "EM_PCP"},
432 {56, "EM_NCPU"},
433 {57, "EM_NDR1"},
434 {58, "EM_STARCORE"},
435 {59, "EM_ME16"},
436 {60, "EM_ST100"},
437 {61, "EM_TINYJ"},
438 {62, "EM_X86_64"},
439 {63, "EM_PDSP"},
440 {64, "EM_PDP10"},
441 {65, "EM_PDP11"},
442 {66, "EM_FX66"},
443 {67, "EM_ST9PLUS"},
444 {68, "EM_ST7"},
445 {69, "EM_68HC16"},
446 {70, "EM_68HC11"},
447 {71, "EM_68HC08"},
448 {72, "EM_68HC05"},
449 {73, "EM_SVX"},
450 {74, "EM_ST19"},
451 {75, "EM_VAX"},
452 {76, "EM_CRIS"},
453 {77, "EM_JAVELIN"},
454 {78, "EM_FIREPATH"},
455 {79, "EM_ZSP"},
456 {80, "EM_MMIX"},
457 {81, "EM_HUANY"},
458 {82, "EM_PRISM"},
459 {83, "EM_AVR"},
460 {84, "EM_FR30"},
461 {85, "EM_D10V"},
462 {86, "EM_D30V"},
463 {87, "EM_V850"},
464 {88, "EM_M32R"},
465 {89, "EM_MN10300"},
466 {90, "EM_MN10200"},
467 {91, "EM_PJ"},
468 {92, "EM_OPENRISC"},
469 {93, "EM_ARC_COMPACT"},
470 {94, "EM_XTENSA"},
471 {95, "EM_VIDEOCORE"},
472 {96, "EM_TMM_GPP"},
473 {97, "EM_NS32K"},
474 {98, "EM_TPC"},
475 {99, "EM_SNP1K"},
476 {100, "EM_ST200"},
477 {101, "EM_IP2K"},
478 {102, "EM_MAX"},
479 {103, "EM_CR"},
480 {104, "EM_F2MC16"},
481 {105, "EM_MSP430"},
482 {106, "EM_BLACKFIN"},
483 {107, "EM_SE_C33"},
484 {108, "EM_SEP"},
485 {109, "EM_ARCA"},
486 {110, "EM_UNICORE"},
487 {111, "EM_EXCESS"},
488 {112, "EM_DXP"},
489 {113, "EM_ALTERA_NIOS2"},
490 {114, "EM_CRX"},
491 {115, "EM_XGATE"},
492 {116, "EM_C166"},
493 {117, "EM_M16C"},
494 {118, "EM_DSPIC30F"},
495 {119, "EM_CE"},
496 {120, "EM_M32C"},
497 {131, "EM_TSK3000"},
498 {132, "EM_RS08"},
499 {133, "EM_SHARC"},
500 {134, "EM_ECOG2"},
501 {135, "EM_SCORE7"},
502 {136, "EM_DSP24"},
503 {137, "EM_VIDEOCORE3"},
504 {138, "EM_LATTICEMICO32"},
505 {139, "EM_SE_C17"},
506 {140, "EM_TI_C6000"},
507 {141, "EM_TI_C2000"},
508 {142, "EM_TI_C5500"},
509 {143, "EM_TI_ARP32"},
510 {144, "EM_TI_PRU"},
511 {160, "EM_MMDSP_PLUS"},
512 {161, "EM_CYPRESS_M8C"},
513 {162, "EM_R32C"},
514 {163, "EM_TRIMEDIA"},
515 {164, "EM_QDSP6"},
516 {165, "EM_8051"},
517 {166, "EM_STXP7X"},
518 {167, "EM_NDS32"},
519 {168, "EM_ECOG1"},
520 {168, "EM_ECOG1X"},
521 {169, "EM_MAXQ30"},
522 {170, "EM_XIMO16"},
523 {171, "EM_MANIK"},
524 {172, "EM_CRAYNV2"},
525 {173, "EM_RX"},
526 {174, "EM_METAG"},
527 {175, "EM_MCST_ELBRUS"},
528 {176, "EM_ECOG16"},
529 {177, "EM_CR16"},
530 {178, "EM_ETPU"},
531 {179, "EM_SLE9X"},
532 {180, "EM_L10M"},
533 {181, "EM_K10M"},
534 {183, "EM_AARCH64"},
535 {185, "EM_AVR32"},
536 {186, "EM_STM8"},
537 {187, "EM_TILE64"},
538 {188, "EM_TILEPRO"},
539 {189, "EM_MICROBLAZE"},
540 {190, "EM_CUDA"},
541 {191, "EM_TILEGX"},
542 {192, "EM_CLOUDSHIELD"},
543 {193, "EM_COREA_1ST"},
544 {194, "EM_COREA_2ND"},
545 {195, "EM_ARC_COMPACT2"},
546 {196, "EM_OPEN8"},
547 {197, "EM_RL78"},
548 {198, "EM_VIDEOCORE5"},
549 {199, "EM_78KOR"},
550 {200, "EM_56800EX"},
551 {201, "EM_BA1"},
552 {202, "EM_BA2"},
553 {203, "EM_XCORE"},
554 {204, "EM_MCHP_PIC"},
555 {205, "EM_INTEL205"},
556 {206, "EM_INTEL206"},
557 {207, "EM_INTEL207"},
558 {208, "EM_INTEL208"},
559 {209, "EM_INTEL209"},
560 {210, "EM_KM32"},
561 {211, "EM_KMX32"},
562 {212, "EM_KMX16"},
563 {213, "EM_KMX8"},
564 {214, "EM_KVARC"},
565 {215, "EM_CDP"},
566 {216, "EM_COGE"},
567 {217, "EM_COOL"},
568 {218, "EM_NORC"},
569 {219, "EM_CSR_KALIMBA "},
570 {220, "EM_Z80 "},
571 {221, "EM_VISIUM "},
572 {222, "EM_FT32 "},
573 {223, "EM_MOXIE"},
574 {224, "EM_AMDGPU"},
575 {243, "EM_RISCV"},
576 {244, "EM_LANAI"},
577 {247, "EM_BPF"},
578
579
580 {6, "EM_486"},
581 {10, "EM_MIPS_RS4_BE"},
582 {41, "EM_ALPHA_STD"},
583 {0x9026, "EM_ALPHA"},
584 }
585
586 func (i Machine) String() string { return stringName(uint32(i), machineStrings, false) }
587 func (i Machine) GoString() string { return stringName(uint32(i), machineStrings, true) }
588
589
590 type SectionIndex int
591
592 const (
593 SHN_UNDEF SectionIndex = 0
594 SHN_LORESERVE SectionIndex = 0xff00
595 SHN_LOPROC SectionIndex = 0xff00
596 SHN_HIPROC SectionIndex = 0xff1f
597 SHN_LOOS SectionIndex = 0xff20
598 SHN_HIOS SectionIndex = 0xff3f
599 SHN_ABS SectionIndex = 0xfff1
600 SHN_COMMON SectionIndex = 0xfff2
601 SHN_XINDEX SectionIndex = 0xffff
602 SHN_HIRESERVE SectionIndex = 0xffff
603 )
604
605 var shnStrings = []intName{
606 {0, "SHN_UNDEF"},
607 {0xff00, "SHN_LOPROC"},
608 {0xff20, "SHN_LOOS"},
609 {0xfff1, "SHN_ABS"},
610 {0xfff2, "SHN_COMMON"},
611 {0xffff, "SHN_XINDEX"},
612 }
613
614 func (i SectionIndex) String() string { return stringName(uint32(i), shnStrings, false) }
615 func (i SectionIndex) GoString() string { return stringName(uint32(i), shnStrings, true) }
616
617
618 type SectionType uint32
619
620 const (
621 SHT_NULL SectionType = 0
622 SHT_PROGBITS SectionType = 1
623 SHT_SYMTAB SectionType = 2
624 SHT_STRTAB SectionType = 3
625 SHT_RELA SectionType = 4
626 SHT_HASH SectionType = 5
627 SHT_DYNAMIC SectionType = 6
628 SHT_NOTE SectionType = 7
629 SHT_NOBITS SectionType = 8
630 SHT_REL SectionType = 9
631 SHT_SHLIB SectionType = 10
632 SHT_DYNSYM SectionType = 11
633 SHT_INIT_ARRAY SectionType = 14
634 SHT_FINI_ARRAY SectionType = 15
635 SHT_PREINIT_ARRAY SectionType = 16
636 SHT_GROUP SectionType = 17
637 SHT_SYMTAB_SHNDX SectionType = 18
638 SHT_LOOS SectionType = 0x60000000
639 SHT_GNU_ATTRIBUTES SectionType = 0x6ffffff5
640 SHT_GNU_HASH SectionType = 0x6ffffff6
641 SHT_GNU_LIBLIST SectionType = 0x6ffffff7
642 SHT_GNU_VERDEF SectionType = 0x6ffffffd
643 SHT_GNU_VERNEED SectionType = 0x6ffffffe
644 SHT_GNU_VERSYM SectionType = 0x6fffffff
645 SHT_HIOS SectionType = 0x6fffffff
646 SHT_LOPROC SectionType = 0x70000000
647 SHT_MIPS_ABIFLAGS SectionType = 0x7000002a
648 SHT_HIPROC SectionType = 0x7fffffff
649 SHT_LOUSER SectionType = 0x80000000
650 SHT_HIUSER SectionType = 0xffffffff
651 )
652
653 var shtStrings = []intName{
654 {0, "SHT_NULL"},
655 {1, "SHT_PROGBITS"},
656 {2, "SHT_SYMTAB"},
657 {3, "SHT_STRTAB"},
658 {4, "SHT_RELA"},
659 {5, "SHT_HASH"},
660 {6, "SHT_DYNAMIC"},
661 {7, "SHT_NOTE"},
662 {8, "SHT_NOBITS"},
663 {9, "SHT_REL"},
664 {10, "SHT_SHLIB"},
665 {11, "SHT_DYNSYM"},
666 {14, "SHT_INIT_ARRAY"},
667 {15, "SHT_FINI_ARRAY"},
668 {16, "SHT_PREINIT_ARRAY"},
669 {17, "SHT_GROUP"},
670 {18, "SHT_SYMTAB_SHNDX"},
671 {0x60000000, "SHT_LOOS"},
672 {0x6ffffff5, "SHT_GNU_ATTRIBUTES"},
673 {0x6ffffff6, "SHT_GNU_HASH"},
674 {0x6ffffff7, "SHT_GNU_LIBLIST"},
675 {0x6ffffffd, "SHT_GNU_VERDEF"},
676 {0x6ffffffe, "SHT_GNU_VERNEED"},
677 {0x6fffffff, "SHT_GNU_VERSYM"},
678 {0x70000000, "SHT_LOPROC"},
679 {0x7000002a, "SHT_MIPS_ABIFLAGS"},
680 {0x7fffffff, "SHT_HIPROC"},
681 {0x80000000, "SHT_LOUSER"},
682 {0xffffffff, "SHT_HIUSER"},
683 }
684
685 func (i SectionType) String() string { return stringName(uint32(i), shtStrings, false) }
686 func (i SectionType) GoString() string { return stringName(uint32(i), shtStrings, true) }
687
688
689 type SectionFlag uint32
690
691 const (
692 SHF_WRITE SectionFlag = 0x1
693 SHF_ALLOC SectionFlag = 0x2
694 SHF_EXECINSTR SectionFlag = 0x4
695 SHF_MERGE SectionFlag = 0x10
696 SHF_STRINGS SectionFlag = 0x20
697 SHF_INFO_LINK SectionFlag = 0x40
698 SHF_LINK_ORDER SectionFlag = 0x80
699 SHF_OS_NONCONFORMING SectionFlag = 0x100
700 SHF_GROUP SectionFlag = 0x200
701 SHF_TLS SectionFlag = 0x400
702 SHF_COMPRESSED SectionFlag = 0x800
703 SHF_MASKOS SectionFlag = 0x0ff00000
704 SHF_MASKPROC SectionFlag = 0xf0000000
705 )
706
707 var shfStrings = []intName{
708 {0x1, "SHF_WRITE"},
709 {0x2, "SHF_ALLOC"},
710 {0x4, "SHF_EXECINSTR"},
711 {0x10, "SHF_MERGE"},
712 {0x20, "SHF_STRINGS"},
713 {0x40, "SHF_INFO_LINK"},
714 {0x80, "SHF_LINK_ORDER"},
715 {0x100, "SHF_OS_NONCONFORMING"},
716 {0x200, "SHF_GROUP"},
717 {0x400, "SHF_TLS"},
718 {0x800, "SHF_COMPRESSED"},
719 }
720
721 func (i SectionFlag) String() string { return flagName(uint32(i), shfStrings, false) }
722 func (i SectionFlag) GoString() string { return flagName(uint32(i), shfStrings, true) }
723
724
725 type CompressionType int
726
727 const (
728 COMPRESS_ZLIB CompressionType = 1
729 COMPRESS_LOOS CompressionType = 0x60000000
730 COMPRESS_HIOS CompressionType = 0x6fffffff
731 COMPRESS_LOPROC CompressionType = 0x70000000
732 COMPRESS_HIPROC CompressionType = 0x7fffffff
733 )
734
735 var compressionStrings = []intName{
736 {0, "COMPRESS_ZLIB"},
737 {0x60000000, "COMPRESS_LOOS"},
738 {0x6fffffff, "COMPRESS_HIOS"},
739 {0x70000000, "COMPRESS_LOPROC"},
740 {0x7fffffff, "COMPRESS_HIPROC"},
741 }
742
743 func (i CompressionType) String() string { return stringName(uint32(i), compressionStrings, false) }
744 func (i CompressionType) GoString() string { return stringName(uint32(i), compressionStrings, true) }
745
746
747 type ProgType int
748
749 const (
750 PT_NULL ProgType = 0
751 PT_LOAD ProgType = 1
752 PT_DYNAMIC ProgType = 2
753 PT_INTERP ProgType = 3
754 PT_NOTE ProgType = 4
755 PT_SHLIB ProgType = 5
756 PT_PHDR ProgType = 6
757 PT_TLS ProgType = 7
758
759 PT_LOOS ProgType = 0x60000000
760
761 PT_GNU_EH_FRAME ProgType = 0x6474e550
762 PT_GNU_STACK ProgType = 0x6474e551
763 PT_GNU_RELRO ProgType = 0x6474e552
764 PT_GNU_PROPERTY ProgType = 0x6474e553
765 PT_GNU_MBIND_LO ProgType = 0x6474e555
766 PT_GNU_MBIND_HI ProgType = 0x6474f554
767
768 PT_PAX_FLAGS ProgType = 0x65041580
769
770 PT_OPENBSD_RANDOMIZE ProgType = 0x65a3dbe6
771 PT_OPENBSD_WXNEEDED ProgType = 0x65a3dbe7
772 PT_OPENBSD_BOOTDATA ProgType = 0x65a41be6
773
774 PT_SUNW_EH_FRAME ProgType = 0x6474e550
775 PT_SUNWSTACK ProgType = 0x6ffffffb
776
777 PT_HIOS ProgType = 0x6fffffff
778
779 PT_LOPROC ProgType = 0x70000000
780
781 PT_ARM_ARCHEXT ProgType = 0x70000000
782 PT_ARM_EXIDX ProgType = 0x70000001
783
784 PT_AARCH64_ARCHEXT ProgType = 0x70000000
785 PT_AARCH64_UNWIND ProgType = 0x70000001
786
787 PT_MIPS_REGINFO ProgType = 0x70000000
788 PT_MIPS_RTPROC ProgType = 0x70000001
789 PT_MIPS_OPTIONS ProgType = 0x70000002
790 PT_MIPS_ABIFLAGS ProgType = 0x70000003
791
792 PT_S390_PGSTE ProgType = 0x70000000
793
794 PT_HIPROC ProgType = 0x7fffffff
795 )
796
797 var ptStrings = []intName{
798 {0, "PT_NULL"},
799 {1, "PT_LOAD"},
800 {2, "PT_DYNAMIC"},
801 {3, "PT_INTERP"},
802 {4, "PT_NOTE"},
803 {5, "PT_SHLIB"},
804 {6, "PT_PHDR"},
805 {7, "PT_TLS"},
806 {0x60000000, "PT_LOOS"},
807 {0x6474e550, "PT_GNU_EH_FRAME"},
808 {0x6474e551, "PT_GNU_STACK"},
809 {0x6474e552, "PT_GNU_RELRO"},
810 {0x6474e553, "PT_GNU_PROPERTY"},
811 {0x65041580, "PT_PAX_FLAGS"},
812 {0x65a3dbe6, "PT_OPENBSD_RANDOMIZE"},
813 {0x65a3dbe7, "PT_OPENBSD_WXNEEDED"},
814 {0x65a41be6, "PT_OPENBSD_BOOTDATA"},
815 {0x6ffffffb, "PT_SUNWSTACK"},
816 {0x6fffffff, "PT_HIOS"},
817 {0x70000000, "PT_LOPROC"},
818
819
820 {0x7fffffff, "PT_HIPROC"},
821 }
822
823 func (i ProgType) String() string { return stringName(uint32(i), ptStrings, false) }
824 func (i ProgType) GoString() string { return stringName(uint32(i), ptStrings, true) }
825
826
827 type ProgFlag uint32
828
829 const (
830 PF_X ProgFlag = 0x1
831 PF_W ProgFlag = 0x2
832 PF_R ProgFlag = 0x4
833 PF_MASKOS ProgFlag = 0x0ff00000
834 PF_MASKPROC ProgFlag = 0xf0000000
835 )
836
837 var pfStrings = []intName{
838 {0x1, "PF_X"},
839 {0x2, "PF_W"},
840 {0x4, "PF_R"},
841 }
842
843 func (i ProgFlag) String() string { return flagName(uint32(i), pfStrings, false) }
844 func (i ProgFlag) GoString() string { return flagName(uint32(i), pfStrings, true) }
845
846
847 type DynTag int
848
849 const (
850 DT_NULL DynTag = 0
851 DT_NEEDED DynTag = 1
852 DT_PLTRELSZ DynTag = 2
853 DT_PLTGOT DynTag = 3
854 DT_HASH DynTag = 4
855 DT_STRTAB DynTag = 5
856 DT_SYMTAB DynTag = 6
857 DT_RELA DynTag = 7
858 DT_RELASZ DynTag = 8
859 DT_RELAENT DynTag = 9
860 DT_STRSZ DynTag = 10
861 DT_SYMENT DynTag = 11
862 DT_INIT DynTag = 12
863 DT_FINI DynTag = 13
864 DT_SONAME DynTag = 14
865 DT_RPATH DynTag = 15
866 DT_SYMBOLIC DynTag = 16
867 DT_REL DynTag = 17
868 DT_RELSZ DynTag = 18
869 DT_RELENT DynTag = 19
870 DT_PLTREL DynTag = 20
871 DT_DEBUG DynTag = 21
872 DT_TEXTREL DynTag = 22
873 DT_JMPREL DynTag = 23
874 DT_BIND_NOW DynTag = 24
875 DT_INIT_ARRAY DynTag = 25
876 DT_FINI_ARRAY DynTag = 26
877 DT_INIT_ARRAYSZ DynTag = 27
878 DT_FINI_ARRAYSZ DynTag = 28
879 DT_RUNPATH DynTag = 29
880 DT_FLAGS DynTag = 30
881 DT_ENCODING DynTag = 32
886 DT_PREINIT_ARRAY DynTag = 32
887 DT_PREINIT_ARRAYSZ DynTag = 33
888 DT_SYMTAB_SHNDX DynTag = 34
889
890 DT_LOOS DynTag = 0x6000000d
891 DT_HIOS DynTag = 0x6ffff000
892
893 DT_VALRNGLO DynTag = 0x6ffffd00
894 DT_GNU_PRELINKED DynTag = 0x6ffffdf5
895 DT_GNU_CONFLICTSZ DynTag = 0x6ffffdf6
896 DT_GNU_LIBLISTSZ DynTag = 0x6ffffdf7
897 DT_CHECKSUM DynTag = 0x6ffffdf8
898 DT_PLTPADSZ DynTag = 0x6ffffdf9
899 DT_MOVEENT DynTag = 0x6ffffdfa
900 DT_MOVESZ DynTag = 0x6ffffdfb
901 DT_FEATURE DynTag = 0x6ffffdfc
902 DT_POSFLAG_1 DynTag = 0x6ffffdfd
903 DT_SYMINSZ DynTag = 0x6ffffdfe
904 DT_SYMINENT DynTag = 0x6ffffdff
905 DT_VALRNGHI DynTag = 0x6ffffdff
906
907 DT_ADDRRNGLO DynTag = 0x6ffffe00
908 DT_GNU_HASH DynTag = 0x6ffffef5
909 DT_TLSDESC_PLT DynTag = 0x6ffffef6
910 DT_TLSDESC_GOT DynTag = 0x6ffffef7
911 DT_GNU_CONFLICT DynTag = 0x6ffffef8
912 DT_GNU_LIBLIST DynTag = 0x6ffffef9
913 DT_CONFIG DynTag = 0x6ffffefa
914 DT_DEPAUDIT DynTag = 0x6ffffefb
915 DT_AUDIT DynTag = 0x6ffffefc
916 DT_PLTPAD DynTag = 0x6ffffefd
917 DT_MOVETAB DynTag = 0x6ffffefe
918 DT_SYMINFO DynTag = 0x6ffffeff
919 DT_ADDRRNGHI DynTag = 0x6ffffeff
920
921 DT_VERSYM DynTag = 0x6ffffff0
922 DT_RELACOUNT DynTag = 0x6ffffff9
923 DT_RELCOUNT DynTag = 0x6ffffffa
924 DT_FLAGS_1 DynTag = 0x6ffffffb
925 DT_VERDEF DynTag = 0x6ffffffc
926 DT_VERDEFNUM DynTag = 0x6ffffffd
927 DT_VERNEED DynTag = 0x6ffffffe
928 DT_VERNEEDNUM DynTag = 0x6fffffff
929
930 DT_LOPROC DynTag = 0x70000000
931
932 DT_MIPS_RLD_VERSION DynTag = 0x70000001
933 DT_MIPS_TIME_STAMP DynTag = 0x70000002
934 DT_MIPS_ICHECKSUM DynTag = 0x70000003
935 DT_MIPS_IVERSION DynTag = 0x70000004
936 DT_MIPS_FLAGS DynTag = 0x70000005
937 DT_MIPS_BASE_ADDRESS DynTag = 0x70000006
938 DT_MIPS_MSYM DynTag = 0x70000007
939 DT_MIPS_CONFLICT DynTag = 0x70000008
940 DT_MIPS_LIBLIST DynTag = 0x70000009
941 DT_MIPS_LOCAL_GOTNO DynTag = 0x7000000a
942 DT_MIPS_CONFLICTNO DynTag = 0x7000000b
943 DT_MIPS_LIBLISTNO DynTag = 0x70000010
944 DT_MIPS_SYMTABNO DynTag = 0x70000011
945 DT_MIPS_UNREFEXTNO DynTag = 0x70000012
946 DT_MIPS_GOTSYM DynTag = 0x70000013
947 DT_MIPS_HIPAGENO DynTag = 0x70000014
948 DT_MIPS_RLD_MAP DynTag = 0x70000016
949 DT_MIPS_DELTA_CLASS DynTag = 0x70000017
950 DT_MIPS_DELTA_CLASS_NO DynTag = 0x70000018
951 DT_MIPS_DELTA_INSTANCE DynTag = 0x70000019
952 DT_MIPS_DELTA_INSTANCE_NO DynTag = 0x7000001a
953 DT_MIPS_DELTA_RELOC DynTag = 0x7000001b
954 DT_MIPS_DELTA_RELOC_NO DynTag = 0x7000001c
955 DT_MIPS_DELTA_SYM DynTag = 0x7000001d
956 DT_MIPS_DELTA_SYM_NO DynTag = 0x7000001e
957 DT_MIPS_DELTA_CLASSSYM DynTag = 0x70000020
958 DT_MIPS_DELTA_CLASSSYM_NO DynTag = 0x70000021
959 DT_MIPS_CXX_FLAGS DynTag = 0x70000022
960 DT_MIPS_PIXIE_INIT DynTag = 0x70000023
961 DT_MIPS_SYMBOL_LIB DynTag = 0x70000024
962 DT_MIPS_LOCALPAGE_GOTIDX DynTag = 0x70000025
963 DT_MIPS_LOCAL_GOTIDX DynTag = 0x70000026
964 DT_MIPS_HIDDEN_GOTIDX DynTag = 0x70000027
965 DT_MIPS_PROTECTED_GOTIDX DynTag = 0x70000028
966 DT_MIPS_OPTIONS DynTag = 0x70000029
967 DT_MIPS_INTERFACE DynTag = 0x7000002a
968 DT_MIPS_DYNSTR_ALIGN DynTag = 0x7000002b
969 DT_MIPS_INTERFACE_SIZE DynTag = 0x7000002c
970 DT_MIPS_RLD_TEXT_RESOLVE_ADDR DynTag = 0x7000002d
971 DT_MIPS_PERF_SUFFIX DynTag = 0x7000002e
972 DT_MIPS_COMPACT_SIZE DynTag = 0x7000002f
973 DT_MIPS_GP_VALUE DynTag = 0x70000030
974 DT_MIPS_AUX_DYNAMIC DynTag = 0x70000031
975 DT_MIPS_PLTGOT DynTag = 0x70000032
976 DT_MIPS_RWPLT DynTag = 0x70000034
977 DT_MIPS_RLD_MAP_REL DynTag = 0x70000035
978
979 DT_PPC_GOT DynTag = 0x70000000
980 DT_PPC_OPT DynTag = 0x70000001
981
982 DT_PPC64_GLINK DynTag = 0x70000000
983 DT_PPC64_OPD DynTag = 0x70000001
984 DT_PPC64_OPDSZ DynTag = 0x70000002
985 DT_PPC64_OPT DynTag = 0x70000003
986
987 DT_SPARC_REGISTER DynTag = 0x70000001
988
989 DT_AUXILIARY DynTag = 0x7ffffffd
990 DT_USED DynTag = 0x7ffffffe
991 DT_FILTER DynTag = 0x7fffffff
992
993 DT_HIPROC DynTag = 0x7fffffff
994 )
995
996 var dtStrings = []intName{
997 {0, "DT_NULL"},
998 {1, "DT_NEEDED"},
999 {2, "DT_PLTRELSZ"},
1000 {3, "DT_PLTGOT"},
1001 {4, "DT_HASH"},
1002 {5, "DT_STRTAB"},
1003 {6, "DT_SYMTAB"},
1004 {7, "DT_RELA"},
1005 {8, "DT_RELASZ"},
1006 {9, "DT_RELAENT"},
1007 {10, "DT_STRSZ"},
1008 {11, "DT_SYMENT"},
1009 {12, "DT_INIT"},
1010 {13, "DT_FINI"},
1011 {14, "DT_SONAME"},
1012 {15, "DT_RPATH"},
1013 {16, "DT_SYMBOLIC"},
1014 {17, "DT_REL"},
1015 {18, "DT_RELSZ"},
1016 {19, "DT_RELENT"},
1017 {20, "DT_PLTREL"},
1018 {21, "DT_DEBUG"},
1019 {22, "DT_TEXTREL"},
1020 {23, "DT_JMPREL"},
1021 {24, "DT_BIND_NOW"},
1022 {25, "DT_INIT_ARRAY"},
1023 {26, "DT_FINI_ARRAY"},
1024 {27, "DT_INIT_ARRAYSZ"},
1025 {28, "DT_FINI_ARRAYSZ"},
1026 {29, "DT_RUNPATH"},
1027 {30, "DT_FLAGS"},
1028 {32, "DT_ENCODING"},
1029 {32, "DT_PREINIT_ARRAY"},
1030 {33, "DT_PREINIT_ARRAYSZ"},
1031 {34, "DT_SYMTAB_SHNDX"},
1032 {0x6000000d, "DT_LOOS"},
1033 {0x6ffff000, "DT_HIOS"},
1034 {0x6ffffd00, "DT_VALRNGLO"},
1035 {0x6ffffdf5, "DT_GNU_PRELINKED"},
1036 {0x6ffffdf6, "DT_GNU_CONFLICTSZ"},
1037 {0x6ffffdf7, "DT_GNU_LIBLISTSZ"},
1038 {0x6ffffdf8, "DT_CHECKSUM"},
1039 {0x6ffffdf9, "DT_PLTPADSZ"},
1040 {0x6ffffdfa, "DT_MOVEENT"},
1041 {0x6ffffdfb, "DT_MOVESZ"},
1042 {0x6ffffdfc, "DT_FEATURE"},
1043 {0x6ffffdfd, "DT_POSFLAG_1"},
1044 {0x6ffffdfe, "DT_SYMINSZ"},
1045 {0x6ffffdff, "DT_SYMINENT"},
1046 {0x6ffffdff, "DT_VALRNGHI"},
1047 {0x6ffffe00, "DT_ADDRRNGLO"},
1048 {0x6ffffef5, "DT_GNU_HASH"},
1049 {0x6ffffef6, "DT_TLSDESC_PLT"},
1050 {0x6ffffef7, "DT_TLSDESC_GOT"},
1051 {0x6ffffef8, "DT_GNU_CONFLICT"},
1052 {0x6ffffef9, "DT_GNU_LIBLIST"},
1053 {0x6ffffefa, "DT_CONFIG"},
1054 {0x6ffffefb, "DT_DEPAUDIT"},
1055 {0x6ffffefc, "DT_AUDIT"},
1056 {0x6ffffefd, "DT_PLTPAD"},
1057 {0x6ffffefe, "DT_MOVETAB"},
1058 {0x6ffffeff, "DT_SYMINFO"},
1059 {0x6ffffeff, "DT_ADDRRNGHI"},
1060 {0x6ffffff0, "DT_VERSYM"},
1061 {0x6ffffff9, "DT_RELACOUNT"},
1062 {0x6ffffffa, "DT_RELCOUNT"},
1063 {0x6ffffffb, "DT_FLAGS_1"},
1064 {0x6ffffffc, "DT_VERDEF"},
1065 {0x6ffffffd, "DT_VERDEFNUM"},
1066 {0x6ffffffe, "DT_VERNEED"},
1067 {0x6fffffff, "DT_VERNEEDNUM"},
1068 {0x70000000, "DT_LOPROC"},
1069
1070
1071 {0x7ffffffd, "DT_AUXILIARY"},
1072 {0x7ffffffe, "DT_USED"},
1073 {0x7fffffff, "DT_FILTER"},
1074 }
1075
1076 func (i DynTag) String() string { return stringName(uint32(i), dtStrings, false) }
1077 func (i DynTag) GoString() string { return stringName(uint32(i), dtStrings, true) }
1078
1079
1080 type DynFlag int
1081
1082 const (
1083 DF_ORIGIN DynFlag = 0x0001
1086 DF_SYMBOLIC DynFlag = 0x0002
1087 DF_TEXTREL DynFlag = 0x0004
1088 DF_BIND_NOW DynFlag = 0x0008
1092 DF_STATIC_TLS DynFlag = 0x0010
1095 )
1096
1097 var dflagStrings = []intName{
1098 {0x0001, "DF_ORIGIN"},
1099 {0x0002, "DF_SYMBOLIC"},
1100 {0x0004, "DF_TEXTREL"},
1101 {0x0008, "DF_BIND_NOW"},
1102 {0x0010, "DF_STATIC_TLS"},
1103 }
1104
1105 func (i DynFlag) String() string { return flagName(uint32(i), dflagStrings, false) }
1106 func (i DynFlag) GoString() string { return flagName(uint32(i), dflagStrings, true) }
1107
1108
1109 type NType int
1110
1111 const (
1112 NT_PRSTATUS NType = 1
1113 NT_FPREGSET NType = 2
1114 NT_PRPSINFO NType = 3
1115 )
1116
1117 var ntypeStrings = []intName{
1118 {1, "NT_PRSTATUS"},
1119 {2, "NT_FPREGSET"},
1120 {3, "NT_PRPSINFO"},
1121 }
1122
1123 func (i NType) String() string { return stringName(uint32(i), ntypeStrings, false) }
1124 func (i NType) GoString() string { return stringName(uint32(i), ntypeStrings, true) }
1125
1126
1127 type SymBind int
1128
1129 const (
1130 STB_LOCAL SymBind = 0
1131 STB_GLOBAL SymBind = 1
1132 STB_WEAK SymBind = 2
1133 STB_LOOS SymBind = 10
1134 STB_HIOS SymBind = 12
1135 STB_LOPROC SymBind = 13
1136 STB_HIPROC SymBind = 15
1137 )
1138
1139 var stbStrings = []intName{
1140 {0, "STB_LOCAL"},
1141 {1, "STB_GLOBAL"},
1142 {2, "STB_WEAK"},
1143 {10, "STB_LOOS"},
1144 {12, "STB_HIOS"},
1145 {13, "STB_LOPROC"},
1146 {15, "STB_HIPROC"},
1147 }
1148
1149 func (i SymBind) String() string { return stringName(uint32(i), stbStrings, false) }
1150 func (i SymBind) GoString() string { return stringName(uint32(i), stbStrings, true) }
1151
1152
1153 type SymType int
1154
1155 const (
1156 STT_NOTYPE SymType = 0
1157 STT_OBJECT SymType = 1
1158 STT_FUNC SymType = 2
1159 STT_SECTION SymType = 3
1160 STT_FILE SymType = 4
1161 STT_COMMON SymType = 5
1162 STT_TLS SymType = 6
1163 STT_LOOS SymType = 10
1164 STT_HIOS SymType = 12
1165 STT_LOPROC SymType = 13
1166 STT_HIPROC SymType = 15
1167 )
1168
1169 var sttStrings = []intName{
1170 {0, "STT_NOTYPE"},
1171 {1, "STT_OBJECT"},
1172 {2, "STT_FUNC"},
1173 {3, "STT_SECTION"},
1174 {4, "STT_FILE"},
1175 {5, "STT_COMMON"},
1176 {6, "STT_TLS"},
1177 {10, "STT_LOOS"},
1178 {12, "STT_HIOS"},
1179 {13, "STT_LOPROC"},
1180 {15, "STT_HIPROC"},
1181 }
1182
1183 func (i SymType) String() string { return stringName(uint32(i), sttStrings, false) }
1184 func (i SymType) GoString() string { return stringName(uint32(i), sttStrings, true) }
1185
1186
1187 type SymVis int
1188
1189 const (
1190 STV_DEFAULT SymVis = 0x0
1191 STV_INTERNAL SymVis = 0x1
1192 STV_HIDDEN SymVis = 0x2
1193 STV_PROTECTED SymVis = 0x3
1194 )
1195
1196 var stvStrings = []intName{
1197 {0x0, "STV_DEFAULT"},
1198 {0x1, "STV_INTERNAL"},
1199 {0x2, "STV_HIDDEN"},
1200 {0x3, "STV_PROTECTED"},
1201 }
1202
1203 func (i SymVis) String() string { return stringName(uint32(i), stvStrings, false) }
1204 func (i SymVis) GoString() string { return stringName(uint32(i), stvStrings, true) }
1205
1206
1209
1210
1211 type R_X86_64 int
1212
1213 const (
1214 R_X86_64_NONE R_X86_64 = 0
1215 R_X86_64_64 R_X86_64 = 1
1216 R_X86_64_PC32 R_X86_64 = 2
1217 R_X86_64_GOT32 R_X86_64 = 3
1218 R_X86_64_PLT32 R_X86_64 = 4
1219 R_X86_64_COPY R_X86_64 = 5
1220 R_X86_64_GLOB_DAT R_X86_64 = 6
1221 R_X86_64_JMP_SLOT R_X86_64 = 7
1222 R_X86_64_RELATIVE R_X86_64 = 8
1223 R_X86_64_GOTPCREL R_X86_64 = 9
1224 R_X86_64_32 R_X86_64 = 10
1225 R_X86_64_32S R_X86_64 = 11
1226 R_X86_64_16 R_X86_64 = 12
1227 R_X86_64_PC16 R_X86_64 = 13
1228 R_X86_64_8 R_X86_64 = 14
1229 R_X86_64_PC8 R_X86_64 = 15
1230 R_X86_64_DTPMOD64 R_X86_64 = 16
1231 R_X86_64_DTPOFF64 R_X86_64 = 17
1232 R_X86_64_TPOFF64 R_X86_64 = 18
1233 R_X86_64_TLSGD R_X86_64 = 19
1234 R_X86_64_TLSLD R_X86_64 = 20
1235 R_X86_64_DTPOFF32 R_X86_64 = 21
1236 R_X86_64_GOTTPOFF R_X86_64 = 22
1237 R_X86_64_TPOFF32 R_X86_64 = 23
1238 R_X86_64_PC64 R_X86_64 = 24
1239 R_X86_64_GOTOFF64 R_X86_64 = 25
1240 R_X86_64_GOTPC32 R_X86_64 = 26
1241 R_X86_64_GOT64 R_X86_64 = 27
1242 R_X86_64_GOTPCREL64 R_X86_64 = 28
1243 R_X86_64_GOTPC64 R_X86_64 = 29
1244 R_X86_64_GOTPLT64 R_X86_64 = 30
1245 R_X86_64_PLTOFF64 R_X86_64 = 31
1246 R_X86_64_SIZE32 R_X86_64 = 32
1247 R_X86_64_SIZE64 R_X86_64 = 33
1248 R_X86_64_GOTPC32_TLSDESC R_X86_64 = 34
1249 R_X86_64_TLSDESC_CALL R_X86_64 = 35
1250 R_X86_64_TLSDESC R_X86_64 = 36
1251 R_X86_64_IRELATIVE R_X86_64 = 37
1252 R_X86_64_RELATIVE64 R_X86_64 = 38
1253 R_X86_64_PC32_BND R_X86_64 = 39
1254 R_X86_64_PLT32_BND R_X86_64 = 40
1255 R_X86_64_GOTPCRELX R_X86_64 = 41
1256 R_X86_64_REX_GOTPCRELX R_X86_64 = 42
1257 )
1258
1259 var rx86_64Strings = []intName{
1260 {0, "R_X86_64_NONE"},
1261 {1, "R_X86_64_64"},
1262 {2, "R_X86_64_PC32"},
1263 {3, "R_X86_64_GOT32"},
1264 {4, "R_X86_64_PLT32"},
1265 {5, "R_X86_64_COPY"},
1266 {6, "R_X86_64_GLOB_DAT"},
1267 {7, "R_X86_64_JMP_SLOT"},
1268 {8, "R_X86_64_RELATIVE"},
1269 {9, "R_X86_64_GOTPCREL"},
1270 {10, "R_X86_64_32"},
1271 {11, "R_X86_64_32S"},
1272 {12, "R_X86_64_16"},
1273 {13, "R_X86_64_PC16"},
1274 {14, "R_X86_64_8"},
1275 {15, "R_X86_64_PC8"},
1276 {16, "R_X86_64_DTPMOD64"},
1277 {17, "R_X86_64_DTPOFF64"},
1278 {18, "R_X86_64_TPOFF64"},
1279 {19, "R_X86_64_TLSGD"},
1280 {20, "R_X86_64_TLSLD"},
1281 {21, "R_X86_64_DTPOFF32"},
1282 {22, "R_X86_64_GOTTPOFF"},
1283 {23, "R_X86_64_TPOFF32"},
1284 {24, "R_X86_64_PC64"},
1285 {25, "R_X86_64_GOTOFF64"},
1286 {26, "R_X86_64_GOTPC32"},
1287 {27, "R_X86_64_GOT64"},
1288 {28, "R_X86_64_GOTPCREL64"},
1289 {29, "R_X86_64_GOTPC64"},
1290 {30, "R_X86_64_GOTPLT64"},
1291 {31, "R_X86_64_PLTOFF64"},
1292 {32, "R_X86_64_SIZE32"},
1293 {33, "R_X86_64_SIZE64"},
1294 {34, "R_X86_64_GOTPC32_TLSDESC"},
1295 {35, "R_X86_64_TLSDESC_CALL"},
1296 {36, "R_X86_64_TLSDESC"},
1297 {37, "R_X86_64_IRELATIVE"},
1298 {38, "R_X86_64_RELATIVE64"},
1299 {39, "R_X86_64_PC32_BND"},
1300 {40, "R_X86_64_PLT32_BND"},
1301 {41, "R_X86_64_GOTPCRELX"},
1302 {42, "R_X86_64_REX_GOTPCRELX"},
1303 }
1304
1305 func (i R_X86_64) String() string { return stringName(uint32(i), rx86_64Strings, false) }
1306 func (i R_X86_64) GoString() string { return stringName(uint32(i), rx86_64Strings, true) }
1307
1308
1309 type R_AARCH64 int
1310
1311 const (
1312 R_AARCH64_NONE R_AARCH64 = 0
1313 R_AARCH64_P32_ABS32 R_AARCH64 = 1
1314 R_AARCH64_P32_ABS16 R_AARCH64 = 2
1315 R_AARCH64_P32_PREL32 R_AARCH64 = 3
1316 R_AARCH64_P32_PREL16 R_AARCH64 = 4
1317 R_AARCH64_P32_MOVW_UABS_G0 R_AARCH64 = 5
1318 R_AARCH64_P32_MOVW_UABS_G0_NC R_AARCH64 = 6
1319 R_AARCH64_P32_MOVW_UABS_G1 R_AARCH64 = 7
1320 R_AARCH64_P32_MOVW_SABS_G0 R_AARCH64 = 8
1321 R_AARCH64_P32_LD_PREL_LO19 R_AARCH64 = 9
1322 R_AARCH64_P32_ADR_PREL_LO21 R_AARCH64 = 10
1323 R_AARCH64_P32_ADR_PREL_PG_HI21 R_AARCH64 = 11
1324 R_AARCH64_P32_ADD_ABS_LO12_NC R_AARCH64 = 12
1325 R_AARCH64_P32_LDST8_ABS_LO12_NC R_AARCH64 = 13
1326 R_AARCH64_P32_LDST16_ABS_LO12_NC R_AARCH64 = 14
1327 R_AARCH64_P32_LDST32_ABS_LO12_NC R_AARCH64 = 15
1328 R_AARCH64_P32_LDST64_ABS_LO12_NC R_AARCH64 = 16
1329 R_AARCH64_P32_LDST128_ABS_LO12_NC R_AARCH64 = 17
1330 R_AARCH64_P32_TSTBR14 R_AARCH64 = 18
1331 R_AARCH64_P32_CONDBR19 R_AARCH64 = 19
1332 R_AARCH64_P32_JUMP26 R_AARCH64 = 20
1333 R_AARCH64_P32_CALL26 R_AARCH64 = 21
1334 R_AARCH64_P32_GOT_LD_PREL19 R_AARCH64 = 25
1335 R_AARCH64_P32_ADR_GOT_PAGE R_AARCH64 = 26
1336 R_AARCH64_P32_LD32_GOT_LO12_NC R_AARCH64 = 27
1337 R_AARCH64_P32_TLSGD_ADR_PAGE21 R_AARCH64 = 81
1338 R_AARCH64_P32_TLSGD_ADD_LO12_NC R_AARCH64 = 82
1339 R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 103
1340 R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC R_AARCH64 = 104
1341 R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 105
1342 R_AARCH64_P32_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 106
1343 R_AARCH64_P32_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 107
1344 R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 108
1345 R_AARCH64_P32_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 109
1346 R_AARCH64_P32_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 110
1347 R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 111
1348 R_AARCH64_P32_TLSDESC_LD_PREL19 R_AARCH64 = 122
1349 R_AARCH64_P32_TLSDESC_ADR_PREL21 R_AARCH64 = 123
1350 R_AARCH64_P32_TLSDESC_ADR_PAGE21 R_AARCH64 = 124
1351 R_AARCH64_P32_TLSDESC_LD32_LO12_NC R_AARCH64 = 125
1352 R_AARCH64_P32_TLSDESC_ADD_LO12_NC R_AARCH64 = 126
1353 R_AARCH64_P32_TLSDESC_CALL R_AARCH64 = 127
1354 R_AARCH64_P32_COPY R_AARCH64 = 180
1355 R_AARCH64_P32_GLOB_DAT R_AARCH64 = 181
1356 R_AARCH64_P32_JUMP_SLOT R_AARCH64 = 182
1357 R_AARCH64_P32_RELATIVE R_AARCH64 = 183
1358 R_AARCH64_P32_TLS_DTPMOD R_AARCH64 = 184
1359 R_AARCH64_P32_TLS_DTPREL R_AARCH64 = 185
1360 R_AARCH64_P32_TLS_TPREL R_AARCH64 = 186
1361 R_AARCH64_P32_TLSDESC R_AARCH64 = 187
1362 R_AARCH64_P32_IRELATIVE R_AARCH64 = 188
1363 R_AARCH64_NULL R_AARCH64 = 256
1364 R_AARCH64_ABS64 R_AARCH64 = 257
1365 R_AARCH64_ABS32 R_AARCH64 = 258
1366 R_AARCH64_ABS16 R_AARCH64 = 259
1367 R_AARCH64_PREL64 R_AARCH64 = 260
1368 R_AARCH64_PREL32 R_AARCH64 = 261
1369 R_AARCH64_PREL16 R_AARCH64 = 262
1370 R_AARCH64_MOVW_UABS_G0 R_AARCH64 = 263
1371 R_AARCH64_MOVW_UABS_G0_NC R_AARCH64 = 264
1372 R_AARCH64_MOVW_UABS_G1 R_AARCH64 = 265
1373 R_AARCH64_MOVW_UABS_G1_NC R_AARCH64 = 266
1374 R_AARCH64_MOVW_UABS_G2 R_AARCH64 = 267
1375 R_AARCH64_MOVW_UABS_G2_NC R_AARCH64 = 268
1376 R_AARCH64_MOVW_UABS_G3 R_AARCH64 = 269
1377 R_AARCH64_MOVW_SABS_G0 R_AARCH64 = 270
1378 R_AARCH64_MOVW_SABS_G1 R_AARCH64 = 271
1379 R_AARCH64_MOVW_SABS_G2 R_AARCH64 = 272
1380 R_AARCH64_LD_PREL_LO19 R_AARCH64 = 273
1381 R_AARCH64_ADR_PREL_LO21 R_AARCH64 = 274
1382 R_AARCH64_ADR_PREL_PG_HI21 R_AARCH64 = 275
1383 R_AARCH64_ADR_PREL_PG_HI21_NC R_AARCH64 = 276
1384 R_AARCH64_ADD_ABS_LO12_NC R_AARCH64 = 277
1385 R_AARCH64_LDST8_ABS_LO12_NC R_AARCH64 = 278
1386 R_AARCH64_TSTBR14 R_AARCH64 = 279
1387 R_AARCH64_CONDBR19 R_AARCH64 = 280
1388 R_AARCH64_JUMP26 R_AARCH64 = 282
1389 R_AARCH64_CALL26 R_AARCH64 = 283
1390 R_AARCH64_LDST16_ABS_LO12_NC R_AARCH64 = 284
1391 R_AARCH64_LDST32_ABS_LO12_NC R_AARCH64 = 285
1392 R_AARCH64_LDST64_ABS_LO12_NC R_AARCH64 = 286
1393 R_AARCH64_LDST128_ABS_LO12_NC R_AARCH64 = 299
1394 R_AARCH64_GOT_LD_PREL19 R_AARCH64 = 309
1395 R_AARCH64_LD64_GOTOFF_LO15 R_AARCH64 = 310
1396 R_AARCH64_ADR_GOT_PAGE R_AARCH64 = 311
1397 R_AARCH64_LD64_GOT_LO12_NC R_AARCH64 = 312
1398 R_AARCH64_LD64_GOTPAGE_LO15 R_AARCH64 = 313
1399 R_AARCH64_TLSGD_ADR_PREL21 R_AARCH64 = 512
1400 R_AARCH64_TLSGD_ADR_PAGE21 R_AARCH64 = 513
1401 R_AARCH64_TLSGD_ADD_LO12_NC R_AARCH64 = 514
1402 R_AARCH64_TLSGD_MOVW_G1 R_AARCH64 = 515
1403 R_AARCH64_TLSGD_MOVW_G0_NC R_AARCH64 = 516
1404 R_AARCH64_TLSLD_ADR_PREL21 R_AARCH64 = 517
1405 R_AARCH64_TLSLD_ADR_PAGE21 R_AARCH64 = 518
1406 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 R_AARCH64 = 539
1407 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC R_AARCH64 = 540
1408 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 R_AARCH64 = 541
1409 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC R_AARCH64 = 542
1410 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 R_AARCH64 = 543
1411 R_AARCH64_TLSLE_MOVW_TPREL_G2 R_AARCH64 = 544
1412 R_AARCH64_TLSLE_MOVW_TPREL_G1 R_AARCH64 = 545
1413 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC R_AARCH64 = 546
1414 R_AARCH64_TLSLE_MOVW_TPREL_G0 R_AARCH64 = 547
1415 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC R_AARCH64 = 548
1416 R_AARCH64_TLSLE_ADD_TPREL_HI12 R_AARCH64 = 549
1417 R_AARCH64_TLSLE_ADD_TPREL_LO12 R_AARCH64 = 550
1418 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC R_AARCH64 = 551
1419 R_AARCH64_TLSDESC_LD_PREL19 R_AARCH64 = 560
1420 R_AARCH64_TLSDESC_ADR_PREL21 R_AARCH64 = 561
1421 R_AARCH64_TLSDESC_ADR_PAGE21 R_AARCH64 = 562
1422 R_AARCH64_TLSDESC_LD64_LO12_NC R_AARCH64 = 563
1423 R_AARCH64_TLSDESC_ADD_LO12_NC R_AARCH64 = 564
1424 R_AARCH64_TLSDESC_OFF_G1 R_AARCH64 = 565
1425 R_AARCH64_TLSDESC_OFF_G0_NC R_AARCH64 = 566
1426 R_AARCH64_TLSDESC_LDR R_AARCH64 = 567
1427 R_AARCH64_TLSDESC_ADD R_AARCH64 = 568
1428 R_AARCH64_TLSDESC_CALL R_AARCH64 = 569
1429 R_AARCH64_TLSLE_LDST128_TPREL_LO12 R_AARCH64 = 570
1430 R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC R_AARCH64 = 571
1431 R_AARCH64_TLSLD_LDST128_DTPREL_LO12 R_AARCH64 = 572
1432 R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC R_AARCH64 = 573
1433 R_AARCH64_COPY R_AARCH64 = 1024
1434 R_AARCH64_GLOB_DAT R_AARCH64 = 1025
1435 R_AARCH64_JUMP_SLOT R_AARCH64 = 1026
1436 R_AARCH64_RELATIVE R_AARCH64 = 1027
1437 R_AARCH64_TLS_DTPMOD64 R_AARCH64 = 1028
1438 R_AARCH64_TLS_DTPREL64 R_AARCH64 = 1029
1439 R_AARCH64_TLS_TPREL64 R_AARCH64 = 1030
1440 R_AARCH64_TLSDESC R_AARCH64 = 1031
1441 R_AARCH64_IRELATIVE R_AARCH64 = 1032
1442 )
1443
1444 var raarch64Strings = []intName{
1445 {0, "R_AARCH64_NONE"},
1446 {1, "R_AARCH64_P32_ABS32"},
1447 {2, "R_AARCH64_P32_ABS16"},
1448 {3, "R_AARCH64_P32_PREL32"},
1449 {4, "R_AARCH64_P32_PREL16"},
1450 {5, "R_AARCH64_P32_MOVW_UABS_G0"},
1451 {6, "R_AARCH64_P32_MOVW_UABS_G0_NC"},
1452 {7, "R_AARCH64_P32_MOVW_UABS_G1"},
1453 {8, "R_AARCH64_P32_MOVW_SABS_G0"},
1454 {9, "R_AARCH64_P32_LD_PREL_LO19"},
1455 {10, "R_AARCH64_P32_ADR_PREL_LO21"},
1456 {11, "R_AARCH64_P32_ADR_PREL_PG_HI21"},
1457 {12, "R_AARCH64_P32_ADD_ABS_LO12_NC"},
1458 {13, "R_AARCH64_P32_LDST8_ABS_LO12_NC"},
1459 {14, "R_AARCH64_P32_LDST16_ABS_LO12_NC"},
1460 {15, "R_AARCH64_P32_LDST32_ABS_LO12_NC"},
1461 {16, "R_AARCH64_P32_LDST64_ABS_LO12_NC"},
1462 {17, "R_AARCH64_P32_LDST128_ABS_LO12_NC"},
1463 {18, "R_AARCH64_P32_TSTBR14"},
1464 {19, "R_AARCH64_P32_CONDBR19"},
1465 {20, "R_AARCH64_P32_JUMP26"},
1466 {21, "R_AARCH64_P32_CALL26"},
1467 {25, "R_AARCH64_P32_GOT_LD_PREL19"},
1468 {26, "R_AARCH64_P32_ADR_GOT_PAGE"},
1469 {27, "R_AARCH64_P32_LD32_GOT_LO12_NC"},
1470 {81, "R_AARCH64_P32_TLSGD_ADR_PAGE21"},
1471 {82, "R_AARCH64_P32_TLSGD_ADD_LO12_NC"},
1472 {103, "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21"},
1473 {104, "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC"},
1474 {105, "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19"},
1475 {106, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1"},
1476 {107, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0"},
1477 {108, "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC"},
1478 {109, "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12"},
1479 {110, "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12"},
1480 {111, "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC"},
1481 {122, "R_AARCH64_P32_TLSDESC_LD_PREL19"},
1482 {123, "R_AARCH64_P32_TLSDESC_ADR_PREL21"},
1483 {124, "R_AARCH64_P32_TLSDESC_ADR_PAGE21"},
1484 {125, "R_AARCH64_P32_TLSDESC_LD32_LO12_NC"},
1485 {126, "R_AARCH64_P32_TLSDESC_ADD_LO12_NC"},
1486 {127, "R_AARCH64_P32_TLSDESC_CALL"},
1487 {180, "R_AARCH64_P32_COPY"},
1488 {181, "R_AARCH64_P32_GLOB_DAT"},
1489 {182, "R_AARCH64_P32_JUMP_SLOT"},
1490 {183, "R_AARCH64_P32_RELATIVE"},
1491 {184, "R_AARCH64_P32_TLS_DTPMOD"},
1492 {185, "R_AARCH64_P32_TLS_DTPREL"},
1493 {186, "R_AARCH64_P32_TLS_TPREL"},
1494 {187, "R_AARCH64_P32_TLSDESC"},
1495 {188, "R_AARCH64_P32_IRELATIVE"},
1496 {256, "R_AARCH64_NULL"},
1497 {257, "R_AARCH64_ABS64"},
1498 {258, "R_AARCH64_ABS32"},
1499 {259, "R_AARCH64_ABS16"},
1500 {260, "R_AARCH64_PREL64"},
1501 {261, "R_AARCH64_PREL32"},
1502 {262, "R_AARCH64_PREL16"},
1503 {263, "R_AARCH64_MOVW_UABS_G0"},
1504 {264, "R_AARCH64_MOVW_UABS_G0_NC"},
1505 {265, "R_AARCH64_MOVW_UABS_G1"},
1506 {266, "R_AARCH64_MOVW_UABS_G1_NC"},
1507 {267, "R_AARCH64_MOVW_UABS_G2"},
1508 {268, "R_AARCH64_MOVW_UABS_G2_NC"},
1509 {269, "R_AARCH64_MOVW_UABS_G3"},
1510 {270, "R_AARCH64_MOVW_SABS_G0"},
1511 {271, "R_AARCH64_MOVW_SABS_G1"},
1512 {272, "R_AARCH64_MOVW_SABS_G2"},
1513 {273, "R_AARCH64_LD_PREL_LO19"},
1514 {274, "R_AARCH64_ADR_PREL_LO21"},
1515 {275, "R_AARCH64_ADR_PREL_PG_HI21"},
1516 {276, "R_AARCH64_ADR_PREL_PG_HI21_NC"},
1517 {277, "R_AARCH64_ADD_ABS_LO12_NC"},
1518 {278, "R_AARCH64_LDST8_ABS_LO12_NC"},
1519 {279, "R_AARCH64_TSTBR14"},
1520 {280, "R_AARCH64_CONDBR19"},
1521 {282, "R_AARCH64_JUMP26"},
1522 {283, "R_AARCH64_CALL26"},
1523 {284, "R_AARCH64_LDST16_ABS_LO12_NC"},
1524 {285, "R_AARCH64_LDST32_ABS_LO12_NC"},
1525 {286, "R_AARCH64_LDST64_ABS_LO12_NC"},
1526 {299, "R_AARCH64_LDST128_ABS_LO12_NC"},
1527 {309, "R_AARCH64_GOT_LD_PREL19"},
1528 {310, "R_AARCH64_LD64_GOTOFF_LO15"},
1529 {311, "R_AARCH64_ADR_GOT_PAGE"},
1530 {312, "R_AARCH64_LD64_GOT_LO12_NC"},
1531 {313, "R_AARCH64_LD64_GOTPAGE_LO15"},
1532 {512, "R_AARCH64_TLSGD_ADR_PREL21"},
1533 {513, "R_AARCH64_TLSGD_ADR_PAGE21"},
1534 {514, "R_AARCH64_TLSGD_ADD_LO12_NC"},
1535 {515, "R_AARCH64_TLSGD_MOVW_G1"},
1536 {516, "R_AARCH64_TLSGD_MOVW_G0_NC"},
1537 {517, "R_AARCH64_TLSLD_ADR_PREL21"},
1538 {518, "R_AARCH64_TLSLD_ADR_PAGE21"},
1539 {539, "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1"},
1540 {540, "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC"},
1541 {541, "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21"},
1542 {542, "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC"},
1543 {543, "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19"},
1544 {544, "R_AARCH64_TLSLE_MOVW_TPREL_G2"},
1545 {545, "R_AARCH64_TLSLE_MOVW_TPREL_G1"},
1546 {546, "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC"},
1547 {547, "R_AARCH64_TLSLE_MOVW_TPREL_G0"},
1548 {548, "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC"},
1549 {549, "R_AARCH64_TLSLE_ADD_TPREL_HI12"},
1550 {550, "R_AARCH64_TLSLE_ADD_TPREL_LO12"},
1551 {551, "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC"},
1552 {560, "R_AARCH64_TLSDESC_LD_PREL19"},
1553 {561, "R_AARCH64_TLSDESC_ADR_PREL21"},
1554 {562, "R_AARCH64_TLSDESC_ADR_PAGE21"},
1555 {563, "R_AARCH64_TLSDESC_LD64_LO12_NC"},
1556 {564, "R_AARCH64_TLSDESC_ADD_LO12_NC"},
1557 {565, "R_AARCH64_TLSDESC_OFF_G1"},
1558 {566, "R_AARCH64_TLSDESC_OFF_G0_NC"},
1559 {567, "R_AARCH64_TLSDESC_LDR"},
1560 {568, "R_AARCH64_TLSDESC_ADD"},
1561 {569, "R_AARCH64_TLSDESC_CALL"},
1562 {570, "R_AARCH64_TLSLE_LDST128_TPREL_LO12"},
1563 {571, "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC"},
1564 {572, "R_AARCH64_TLSLD_LDST128_DTPREL_LO12"},
1565 {573, "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC"},
1566 {1024, "R_AARCH64_COPY"},
1567 {1025, "R_AARCH64_GLOB_DAT"},
1568 {1026, "R_AARCH64_JUMP_SLOT"},
1569 {1027, "R_AARCH64_RELATIVE"},
1570 {1028, "R_AARCH64_TLS_DTPMOD64"},
1571 {1029, "R_AARCH64_TLS_DTPREL64"},
1572 {1030, "R_AARCH64_TLS_TPREL64"},
1573 {1031, "R_AARCH64_TLSDESC"},
1574 {1032, "R_AARCH64_IRELATIVE"},
1575 }
1576
1577 func (i R_AARCH64) String() string { return stringName(uint32(i), raarch64Strings, false) }
1578 func (i R_AARCH64) GoString() string { return stringName(uint32(i), raarch64Strings, true) }
1579
1580
1581 type R_ALPHA int
1582
1583 const (
1584 R_ALPHA_NONE R_ALPHA = 0
1585 R_ALPHA_REFLONG R_ALPHA = 1
1586 R_ALPHA_REFQUAD R_ALPHA = 2
1587 R_ALPHA_GPREL32 R_ALPHA = 3
1588 R_ALPHA_LITERAL R_ALPHA = 4
1589 R_ALPHA_LITUSE R_ALPHA = 5
1590 R_ALPHA_GPDISP R_ALPHA = 6
1591 R_ALPHA_BRADDR R_ALPHA = 7
1592 R_ALPHA_HINT R_ALPHA = 8
1593 R_ALPHA_SREL16 R_ALPHA = 9
1594 R_ALPHA_SREL32 R_ALPHA = 10
1595 R_ALPHA_SREL64 R_ALPHA = 11
1596 R_ALPHA_OP_PUSH R_ALPHA = 12
1597 R_ALPHA_OP_STORE R_ALPHA = 13
1598 R_ALPHA_OP_PSUB R_ALPHA = 14
1599 R_ALPHA_OP_PRSHIFT R_ALPHA = 15
1600 R_ALPHA_GPVALUE R_ALPHA = 16
1601 R_ALPHA_GPRELHIGH R_ALPHA = 17
1602 R_ALPHA_GPRELLOW R_ALPHA = 18
1603 R_ALPHA_IMMED_GP_16 R_ALPHA = 19
1604 R_ALPHA_IMMED_GP_HI32 R_ALPHA = 20
1605 R_ALPHA_IMMED_SCN_HI32 R_ALPHA = 21
1606 R_ALPHA_IMMED_BR_HI32 R_ALPHA = 22
1607 R_ALPHA_IMMED_LO32 R_ALPHA = 23
1608 R_ALPHA_COPY R_ALPHA = 24
1609 R_ALPHA_GLOB_DAT R_ALPHA = 25
1610 R_ALPHA_JMP_SLOT R_ALPHA = 26
1611 R_ALPHA_RELATIVE R_ALPHA = 27
1612 )
1613
1614 var ralphaStrings = []intName{
1615 {0, "R_ALPHA_NONE"},
1616 {1, "R_ALPHA_REFLONG"},
1617 {2, "R_ALPHA_REFQUAD"},
1618 {3, "R_ALPHA_GPREL32"},
1619 {4, "R_ALPHA_LITERAL"},
1620 {5, "R_ALPHA_LITUSE"},
1621 {6, "R_ALPHA_GPDISP"},
1622 {7, "R_ALPHA_BRADDR"},
1623 {8, "R_ALPHA_HINT"},
1624 {9, "R_ALPHA_SREL16"},
1625 {10, "R_ALPHA_SREL32"},
1626 {11, "R_ALPHA_SREL64"},
1627 {12, "R_ALPHA_OP_PUSH"},
1628 {13, "R_ALPHA_OP_STORE"},
1629 {14, "R_ALPHA_OP_PSUB"},
1630 {15, "R_ALPHA_OP_PRSHIFT"},
1631 {16, "R_ALPHA_GPVALUE"},
1632 {17, "R_ALPHA_GPRELHIGH"},
1633 {18, "R_ALPHA_GPRELLOW"},
1634 {19, "R_ALPHA_IMMED_GP_16"},
1635 {20, "R_ALPHA_IMMED_GP_HI32"},
1636 {21, "R_ALPHA_IMMED_SCN_HI32"},
1637 {22, "R_ALPHA_IMMED_BR_HI32"},
1638 {23, "R_ALPHA_IMMED_LO32"},
1639 {24, "R_ALPHA_COPY"},
1640 {25, "R_ALPHA_GLOB_DAT"},
1641 {26, "R_ALPHA_JMP_SLOT"},
1642 {27, "R_ALPHA_RELATIVE"},
1643 }
1644
1645 func (i R_ALPHA) String() string { return stringName(uint32(i), ralphaStrings, false) }
1646 func (i R_ALPHA) GoString() string { return stringName(uint32(i), ralphaStrings, true) }
1647
1648
1649 type R_ARM int
1650
1651 const (
1652 R_ARM_NONE R_ARM = 0
1653 R_ARM_PC24 R_ARM = 1
1654 R_ARM_ABS32 R_ARM = 2
1655 R_ARM_REL32 R_ARM = 3
1656 R_ARM_PC13 R_ARM = 4
1657 R_ARM_ABS16 R_ARM = 5
1658 R_ARM_ABS12 R_ARM = 6
1659 R_ARM_THM_ABS5 R_ARM = 7
1660 R_ARM_ABS8 R_ARM = 8
1661 R_ARM_SBREL32 R_ARM = 9
1662 R_ARM_THM_PC22 R_ARM = 10
1663 R_ARM_THM_PC8 R_ARM = 11
1664 R_ARM_AMP_VCALL9 R_ARM = 12
1665 R_ARM_SWI24 R_ARM = 13
1666 R_ARM_THM_SWI8 R_ARM = 14
1667 R_ARM_XPC25 R_ARM = 15
1668 R_ARM_THM_XPC22 R_ARM = 16
1669 R_ARM_TLS_DTPMOD32 R_ARM = 17
1670 R_ARM_TLS_DTPOFF32 R_ARM = 18
1671 R_ARM_TLS_TPOFF32 R_ARM = 19
1672 R_ARM_COPY R_ARM = 20
1673 R_ARM_GLOB_DAT R_ARM = 21
1674 R_ARM_JUMP_SLOT R_ARM = 22
1675 R_ARM_RELATIVE R_ARM = 23
1676 R_ARM_GOTOFF R_ARM = 24
1677 R_ARM_GOTPC R_ARM = 25
1678 R_ARM_GOT32 R_ARM = 26
1679 R_ARM_PLT32 R_ARM = 27
1680 R_ARM_CALL R_ARM = 28
1681 R_ARM_JUMP24 R_ARM = 29
1682 R_ARM_THM_JUMP24 R_ARM = 30
1683 R_ARM_BASE_ABS R_ARM = 31
1684 R_ARM_ALU_PCREL_7_0 R_ARM = 32
1685 R_ARM_ALU_PCREL_15_8 R_ARM = 33
1686 R_ARM_ALU_PCREL_23_15 R_ARM = 34
1687 R_ARM_LDR_SBREL_11_10_NC R_ARM = 35
1688 R_ARM_ALU_SBREL_19_12_NC R_ARM = 36
1689 R_ARM_ALU_SBREL_27_20_CK R_ARM = 37
1690 R_ARM_TARGET1 R_ARM = 38
1691 R_ARM_SBREL31 R_ARM = 39
1692 R_ARM_V4BX R_ARM = 40
1693 R_ARM_TARGET2 R_ARM = 41
1694 R_ARM_PREL31 R_ARM = 42
1695 R_ARM_MOVW_ABS_NC R_ARM = 43
1696 R_ARM_MOVT_ABS R_ARM = 44
1697 R_ARM_MOVW_PREL_NC R_ARM = 45
1698 R_ARM_MOVT_PREL R_ARM = 46
1699 R_ARM_THM_MOVW_ABS_NC R_ARM = 47
1700 R_ARM_THM_MOVT_ABS R_ARM = 48
1701 R_ARM_THM_MOVW_PREL_NC R_ARM = 49
1702 R_ARM_THM_MOVT_PREL R_ARM = 50
1703 R_ARM_THM_JUMP19 R_ARM = 51
1704 R_ARM_THM_JUMP6 R_ARM = 52
1705 R_ARM_THM_ALU_PREL_11_0 R_ARM = 53
1706 R_ARM_THM_PC12 R_ARM = 54
1707 R_ARM_ABS32_NOI R_ARM = 55
1708 R_ARM_REL32_NOI R_ARM = 56
1709 R_ARM_ALU_PC_G0_NC R_ARM = 57
1710 R_ARM_ALU_PC_G0 R_ARM = 58
1711 R_ARM_ALU_PC_G1_NC R_ARM = 59
1712 R_ARM_ALU_PC_G1 R_ARM = 60
1713 R_ARM_ALU_PC_G2 R_ARM = 61
1714 R_ARM_LDR_PC_G1 R_ARM = 62
1715 R_ARM_LDR_PC_G2 R_ARM = 63
1716 R_ARM_LDRS_PC_G0 R_ARM = 64
1717 R_ARM_LDRS_PC_G1 R_ARM = 65
1718 R_ARM_LDRS_PC_G2 R_ARM = 66
1719 R_ARM_LDC_PC_G0 R_ARM = 67
1720 R_ARM_LDC_PC_G1 R_ARM = 68
1721 R_ARM_LDC_PC_G2 R_ARM = 69
1722 R_ARM_ALU_SB_G0_NC R_ARM = 70
1723 R_ARM_ALU_SB_G0 R_ARM = 71
1724 R_ARM_ALU_SB_G1_NC R_ARM = 72
1725 R_ARM_ALU_SB_G1 R_ARM = 73
1726 R_ARM_ALU_SB_G2 R_ARM = 74
1727 R_ARM_LDR_SB_G0 R_ARM = 75
1728 R_ARM_LDR_SB_G1 R_ARM = 76
1729 R_ARM_LDR_SB_G2 R_ARM = 77
1730 R_ARM_LDRS_SB_G0 R_ARM = 78
1731 R_ARM_LDRS_SB_G1 R_ARM = 79
1732 R_ARM_LDRS_SB_G2 R_ARM = 80
1733 R_ARM_LDC_SB_G0 R_ARM = 81
1734 R_ARM_LDC_SB_G1 R_ARM = 82
1735 R_ARM_LDC_SB_G2 R_ARM = 83
1736 R_ARM_MOVW_BREL_NC R_ARM = 84
1737 R_ARM_MOVT_BREL R_ARM = 85
1738 R_ARM_MOVW_BREL R_ARM = 86
1739 R_ARM_THM_MOVW_BREL_NC R_ARM = 87
1740 R_ARM_THM_MOVT_BREL R_ARM = 88
1741 R_ARM_THM_MOVW_BREL R_ARM = 89
1742 R_ARM_TLS_GOTDESC R_ARM = 90
1743 R_ARM_TLS_CALL R_ARM = 91
1744 R_ARM_TLS_DESCSEQ R_ARM = 92
1745 R_ARM_THM_TLS_CALL R_ARM = 93
1746 R_ARM_PLT32_ABS R_ARM = 94
1747 R_ARM_GOT_ABS R_ARM = 95
1748 R_ARM_GOT_PREL R_ARM = 96
1749 R_ARM_GOT_BREL12 R_ARM = 97
1750 R_ARM_GOTOFF12 R_ARM = 98
1751 R_ARM_GOTRELAX R_ARM = 99
1752 R_ARM_GNU_VTENTRY R_ARM = 100
1753 R_ARM_GNU_VTINHERIT R_ARM = 101
1754 R_ARM_THM_JUMP11 R_ARM = 102
1755 R_ARM_THM_JUMP8 R_ARM = 103
1756 R_ARM_TLS_GD32 R_ARM = 104
1757 R_ARM_TLS_LDM32 R_ARM = 105
1758 R_ARM_TLS_LDO32 R_ARM = 106
1759 R_ARM_TLS_IE32 R_ARM = 107
1760 R_ARM_TLS_LE32 R_ARM = 108
1761 R_ARM_TLS_LDO12 R_ARM = 109
1762 R_ARM_TLS_LE12 R_ARM = 110
1763 R_ARM_TLS_IE12GP R_ARM = 111
1764 R_ARM_PRIVATE_0 R_ARM = 112
1765 R_ARM_PRIVATE_1 R_ARM = 113
1766 R_ARM_PRIVATE_2 R_ARM = 114
1767 R_ARM_PRIVATE_3 R_ARM = 115
1768 R_ARM_PRIVATE_4 R_ARM = 116
1769 R_ARM_PRIVATE_5 R_ARM = 117
1770 R_ARM_PRIVATE_6 R_ARM = 118
1771 R_ARM_PRIVATE_7 R_ARM = 119
1772 R_ARM_PRIVATE_8 R_ARM = 120
1773 R_ARM_PRIVATE_9 R_ARM = 121
1774 R_ARM_PRIVATE_10 R_ARM = 122
1775 R_ARM_PRIVATE_11 R_ARM = 123
1776 R_ARM_PRIVATE_12 R_ARM = 124
1777 R_ARM_PRIVATE_13 R_ARM = 125
1778 R_ARM_PRIVATE_14 R_ARM = 126
1779 R_ARM_PRIVATE_15 R_ARM = 127
1780 R_ARM_ME_TOO R_ARM = 128
1781 R_ARM_THM_TLS_DESCSEQ16 R_ARM = 129
1782 R_ARM_THM_TLS_DESCSEQ32 R_ARM = 130
1783 R_ARM_THM_GOT_BREL12 R_ARM = 131
1784 R_ARM_THM_ALU_ABS_G0_NC R_ARM = 132
1785 R_ARM_THM_ALU_ABS_G1_NC R_ARM = 133
1786 R_ARM_THM_ALU_ABS_G2_NC R_ARM = 134
1787 R_ARM_THM_ALU_ABS_G3 R_ARM = 135
1788 R_ARM_IRELATIVE R_ARM = 160
1789 R_ARM_RXPC25 R_ARM = 249
1790 R_ARM_RSBREL32 R_ARM = 250
1791 R_ARM_THM_RPC22 R_ARM = 251
1792 R_ARM_RREL32 R_ARM = 252
1793 R_ARM_RABS32 R_ARM = 253
1794 R_ARM_RPC24 R_ARM = 254
1795 R_ARM_RBASE R_ARM = 255
1796 )
1797
1798 var rarmStrings = []intName{
1799 {0, "R_ARM_NONE"},
1800 {1, "R_ARM_PC24"},
1801 {2, "R_ARM_ABS32"},
1802 {3, "R_ARM_REL32"},
1803 {4, "R_ARM_PC13"},
1804 {5, "R_ARM_ABS16"},
1805 {6, "R_ARM_ABS12"},
1806 {7, "R_ARM_THM_ABS5"},
1807 {8, "R_ARM_ABS8"},
1808 {9, "R_ARM_SBREL32"},
1809 {10, "R_ARM_THM_PC22"},
1810 {11, "R_ARM_THM_PC8"},
1811 {12, "R_ARM_AMP_VCALL9"},
1812 {13, "R_ARM_SWI24"},
1813 {14, "R_ARM_THM_SWI8"},
1814 {15, "R_ARM_XPC25"},
1815 {16, "R_ARM_THM_XPC22"},
1816 {17, "R_ARM_TLS_DTPMOD32"},
1817 {18, "R_ARM_TLS_DTPOFF32"},
1818 {19, "R_ARM_TLS_TPOFF32"},
1819 {20, "R_ARM_COPY"},
1820 {21, "R_ARM_GLOB_DAT"},
1821 {22, "R_ARM_JUMP_SLOT"},
1822 {23, "R_ARM_RELATIVE"},
1823 {24, "R_ARM_GOTOFF"},
1824 {25, "R_ARM_GOTPC"},
1825 {26, "R_ARM_GOT32"},
1826 {27, "R_ARM_PLT32"},
1827 {28, "R_ARM_CALL"},
1828 {29, "R_ARM_JUMP24"},
1829 {30, "R_ARM_THM_JUMP24"},
1830 {31, "R_ARM_BASE_ABS"},
1831 {32, "R_ARM_ALU_PCREL_7_0"},
1832 {33, "R_ARM_ALU_PCREL_15_8"},
1833 {34, "R_ARM_ALU_PCREL_23_15"},
1834 {35, "R_ARM_LDR_SBREL_11_10_NC"},
1835 {36, "R_ARM_ALU_SBREL_19_12_NC"},
1836 {37, "R_ARM_ALU_SBREL_27_20_CK"},
1837 {38, "R_ARM_TARGET1"},
1838 {39, "R_ARM_SBREL31"},
1839 {40, "R_ARM_V4BX"},
1840 {41, "R_ARM_TARGET2"},
1841 {42, "R_ARM_PREL31"},
1842 {43, "R_ARM_MOVW_ABS_NC"},
1843 {44, "R_ARM_MOVT_ABS"},
1844 {45, "R_ARM_MOVW_PREL_NC"},
1845 {46, "R_ARM_MOVT_PREL"},
1846 {47, "R_ARM_THM_MOVW_ABS_NC"},
1847 {48, "R_ARM_THM_MOVT_ABS"},
1848 {49, "R_ARM_THM_MOVW_PREL_NC"},
1849 {50, "R_ARM_THM_MOVT_PREL"},
1850 {51, "R_ARM_THM_JUMP19"},
1851 {52, "R_ARM_THM_JUMP6"},
1852 {53, "R_ARM_THM_ALU_PREL_11_0"},
1853 {54, "R_ARM_THM_PC12"},
1854 {55, "R_ARM_ABS32_NOI"},
1855 {56, "R_ARM_REL32_NOI"},
1856 {57, "R_ARM_ALU_PC_G0_NC"},
1857 {58, "R_ARM_ALU_PC_G0"},
1858 {59, "R_ARM_ALU_PC_G1_NC"},
1859 {60, "R_ARM_ALU_PC_G1"},
1860 {61, "R_ARM_ALU_PC_G2"},
1861 {62, "R_ARM_LDR_PC_G1"},
1862 {63, "R_ARM_LDR_PC_G2"},
1863 {64, "R_ARM_LDRS_PC_G0"},
1864 {65, "R_ARM_LDRS_PC_G1"},
1865 {66, "R_ARM_LDRS_PC_G2"},
1866 {67, "R_ARM_LDC_PC_G0"},
1867 {68, "R_ARM_LDC_PC_G1"},
1868 {69, "R_ARM_LDC_PC_G2"},
1869 {70, "R_ARM_ALU_SB_G0_NC"},
1870 {71, "R_ARM_ALU_SB_G0"},
1871 {72, "R_ARM_ALU_SB_G1_NC"},
1872 {73, "R_ARM_ALU_SB_G1"},
1873 {74, "R_ARM_ALU_SB_G2"},
1874 {75, "R_ARM_LDR_SB_G0"},
1875 {76, "R_ARM_LDR_SB_G1"},
1876 {77, "R_ARM_LDR_SB_G2"},
1877 {78, "R_ARM_LDRS_SB_G0"},
1878 {79, "R_ARM_LDRS_SB_G1"},
1879 {80, "R_ARM_LDRS_SB_G2"},
1880 {81, "R_ARM_LDC_SB_G0"},
1881 {82, "R_ARM_LDC_SB_G1"},
1882 {83, "R_ARM_LDC_SB_G2"},
1883 {84, "R_ARM_MOVW_BREL_NC"},
1884 {85, "R_ARM_MOVT_BREL"},
1885 {86, "R_ARM_MOVW_BREL"},
1886 {87, "R_ARM_THM_MOVW_BREL_NC"},
1887 {88, "R_ARM_THM_MOVT_BREL"},
1888 {89, "R_ARM_THM_MOVW_BREL"},
1889 {90, "R_ARM_TLS_GOTDESC"},
1890 {91, "R_ARM_TLS_CALL"},
1891 {92, "R_ARM_TLS_DESCSEQ"},
1892 {93, "R_ARM_THM_TLS_CALL"},
1893 {94, "R_ARM_PLT32_ABS"},
1894 {95, "R_ARM_GOT_ABS"},
1895 {96, "R_ARM_GOT_PREL"},
1896 {97, "R_ARM_GOT_BREL12"},
1897 {98, "R_ARM_GOTOFF12"},
1898 {99, "R_ARM_GOTRELAX"},
1899 {100, "R_ARM_GNU_VTENTRY"},
1900 {101, "R_ARM_GNU_VTINHERIT"},
1901 {102, "R_ARM_THM_JUMP11"},
1902 {103, "R_ARM_THM_JUMP8"},
1903 {104, "R_ARM_TLS_GD32"},
1904 {105, "R_ARM_TLS_LDM32"},
1905 {106, "R_ARM_TLS_LDO32"},
1906 {107, "R_ARM_TLS_IE32"},
1907 {108, "R_ARM_TLS_LE32"},
1908 {109, "R_ARM_TLS_LDO12"},
1909 {110, "R_ARM_TLS_LE12"},
1910 {111, "R_ARM_TLS_IE12GP"},
1911 {112, "R_ARM_PRIVATE_0"},
1912 {113, "R_ARM_PRIVATE_1"},
1913 {114, "R_ARM_PRIVATE_2"},
1914 {115, "R_ARM_PRIVATE_3"},
1915 {116, "R_ARM_PRIVATE_4"},
1916 {117, "R_ARM_PRIVATE_5"},
1917 {118, "R_ARM_PRIVATE_6"},
1918 {119, "R_ARM_PRIVATE_7"},
1919 {120, "R_ARM_PRIVATE_8"},
1920 {121, "R_ARM_PRIVATE_9"},
1921 {122, "R_ARM_PRIVATE_10"},
1922 {123, "R_ARM_PRIVATE_11"},
1923 {124, "R_ARM_PRIVATE_12"},
1924 {125, "R_ARM_PRIVATE_13"},
1925 {126, "R_ARM_PRIVATE_14"},
1926 {127, "R_ARM_PRIVATE_15"},
1927 {128, "R_ARM_ME_TOO"},
1928 {129, "R_ARM_THM_TLS_DESCSEQ16"},
1929 {130, "R_ARM_THM_TLS_DESCSEQ32"},
1930 {131, "R_ARM_THM_GOT_BREL12"},
1931 {132, "R_ARM_THM_ALU_ABS_G0_NC"},
1932 {133, "R_ARM_THM_ALU_ABS_G1_NC"},
1933 {134, "R_ARM_THM_ALU_ABS_G2_NC"},
1934 {135, "R_ARM_THM_ALU_ABS_G3"},
1935 {160, "R_ARM_IRELATIVE"},
1936 {249, "R_ARM_RXPC25"},
1937 {250, "R_ARM_RSBREL32"},
1938 {251, "R_ARM_THM_RPC22"},
1939 {252, "R_ARM_RREL32"},
1940 {253, "R_ARM_RABS32"},
1941 {254, "R_ARM_RPC24"},
1942 {255, "R_ARM_RBASE"},
1943 }
1944
1945 func (i R_ARM) String() string { return stringName(uint32(i), rarmStrings, false) }
1946 func (i R_ARM) GoString() string { return stringName(uint32(i), rarmStrings, true) }
1947
1948
1949 type R_386 int
1950
1951 const (
1952 R_386_NONE R_386 = 0
1953 R_386_32 R_386 = 1
1954 R_386_PC32 R_386 = 2
1955 R_386_GOT32 R_386 = 3
1956 R_386_PLT32 R_386 = 4
1957 R_386_COPY R_386 = 5
1958 R_386_GLOB_DAT R_386 = 6
1959 R_386_JMP_SLOT R_386 = 7
1960 R_386_RELATIVE R_386 = 8
1961 R_386_GOTOFF R_386 = 9
1962 R_386_GOTPC R_386 = 10
1963 R_386_32PLT R_386 = 11
1964 R_386_TLS_TPOFF R_386 = 14
1965 R_386_TLS_IE R_386 = 15
1966 R_386_TLS_GOTIE R_386 = 16
1967 R_386_TLS_LE R_386 = 17
1968 R_386_TLS_GD R_386 = 18
1969 R_386_TLS_LDM R_386 = 19
1970 R_386_16 R_386 = 20
1971 R_386_PC16 R_386 = 21
1972 R_386_8 R_386 = 22
1973 R_386_PC8 R_386 = 23
1974 R_386_TLS_GD_32 R_386 = 24
1975 R_386_TLS_GD_PUSH R_386 = 25
1976 R_386_TLS_GD_CALL R_386 = 26
1977 R_386_TLS_GD_POP R_386 = 27
1978 R_386_TLS_LDM_32 R_386 = 28
1979 R_386_TLS_LDM_PUSH R_386 = 29
1980 R_386_TLS_LDM_CALL R_386 = 30
1981 R_386_TLS_LDM_POP R_386 = 31
1982 R_386_TLS_LDO_32 R_386 = 32
1983 R_386_TLS_IE_32 R_386 = 33
1984 R_386_TLS_LE_32 R_386 = 34
1985 R_386_TLS_DTPMOD32 R_386 = 35
1986 R_386_TLS_DTPOFF32 R_386 = 36
1987 R_386_TLS_TPOFF32 R_386 = 37
1988 R_386_SIZE32 R_386 = 38
1989 R_386_TLS_GOTDESC R_386 = 39
1990 R_386_TLS_DESC_CALL R_386 = 40
1991 R_386_TLS_DESC R_386 = 41
1992 R_386_IRELATIVE R_386 = 42
1993 R_386_GOT32X R_386 = 43
1994 )
1995
1996 var r386Strings = []intName{
1997 {0, "R_386_NONE"},
1998 {1, "R_386_32"},
1999 {2, "R_386_PC32"},
2000 {3, "R_386_GOT32"},
2001 {4, "R_386_PLT32"},
2002 {5, "R_386_COPY"},
2003 {6, "R_386_GLOB_DAT"},
2004 {7, "R_386_JMP_SLOT"},
2005 {8, "R_386_RELATIVE"},
2006 {9, "R_386_GOTOFF"},
2007 {10, "R_386_GOTPC"},
2008 {11, "R_386_32PLT"},
2009 {14, "R_386_TLS_TPOFF"},
2010 {15, "R_386_TLS_IE"},
2011 {16, "R_386_TLS_GOTIE"},
2012 {17, "R_386_TLS_LE"},
2013 {18, "R_386_TLS_GD"},
2014 {19, "R_386_TLS_LDM"},
2015 {20, "R_386_16"},
2016 {21, "R_386_PC16"},
2017 {22, "R_386_8"},
2018 {23, "R_386_PC8"},
2019 {24, "R_386_TLS_GD_32"},
2020 {25, "R_386_TLS_GD_PUSH"},
2021 {26, "R_386_TLS_GD_CALL"},
2022 {27, "R_386_TLS_GD_POP"},
2023 {28, "R_386_TLS_LDM_32"},
2024 {29, "R_386_TLS_LDM_PUSH"},
2025 {30, "R_386_TLS_LDM_CALL"},
2026 {31, "R_386_TLS_LDM_POP"},
2027 {32, "R_386_TLS_LDO_32"},
2028 {33, "R_386_TLS_IE_32"},
2029 {34, "R_386_TLS_LE_32"},
2030 {35, "R_386_TLS_DTPMOD32"},
2031 {36, "R_386_TLS_DTPOFF32"},
2032 {37, "R_386_TLS_TPOFF32"},
2033 {38, "R_386_SIZE32"},
2034 {39, "R_386_TLS_GOTDESC"},
2035 {40, "R_386_TLS_DESC_CALL"},
2036 {41, "R_386_TLS_DESC"},
2037 {42, "R_386_IRELATIVE"},
2038 {43, "R_386_GOT32X"},
2039 }
2040
2041 func (i R_386) String() string { return stringName(uint32(i), r386Strings, false) }
2042 func (i R_386) GoString() string { return stringName(uint32(i), r386Strings, true) }
2043
2044
2045 type R_MIPS int
2046
2047 const (
2048 R_MIPS_NONE R_MIPS = 0
2049 R_MIPS_16 R_MIPS = 1
2050 R_MIPS_32 R_MIPS = 2
2051 R_MIPS_REL32 R_MIPS = 3
2052 R_MIPS_26 R_MIPS = 4
2053 R_MIPS_HI16 R_MIPS = 5
2054 R_MIPS_LO16 R_MIPS = 6
2055 R_MIPS_GPREL16 R_MIPS = 7
2056 R_MIPS_LITERAL R_MIPS = 8
2057 R_MIPS_GOT16 R_MIPS = 9
2058 R_MIPS_PC16 R_MIPS = 10
2059 R_MIPS_CALL16 R_MIPS = 11
2060 R_MIPS_GPREL32 R_MIPS = 12
2061 R_MIPS_SHIFT5 R_MIPS = 16
2062 R_MIPS_SHIFT6 R_MIPS = 17
2063 R_MIPS_64 R_MIPS = 18
2064 R_MIPS_GOT_DISP R_MIPS = 19
2065 R_MIPS_GOT_PAGE R_MIPS = 20
2066 R_MIPS_GOT_OFST R_MIPS = 21
2067 R_MIPS_GOT_HI16 R_MIPS = 22
2068 R_MIPS_GOT_LO16 R_MIPS = 23
2069 R_MIPS_SUB R_MIPS = 24
2070 R_MIPS_INSERT_A R_MIPS = 25
2071 R_MIPS_INSERT_B R_MIPS = 26
2072 R_MIPS_DELETE R_MIPS = 27
2073 R_MIPS_HIGHER R_MIPS = 28
2074 R_MIPS_HIGHEST R_MIPS = 29
2075 R_MIPS_CALL_HI16 R_MIPS = 30
2076 R_MIPS_CALL_LO16 R_MIPS = 31
2077 R_MIPS_SCN_DISP R_MIPS = 32
2078 R_MIPS_REL16 R_MIPS = 33
2079 R_MIPS_ADD_IMMEDIATE R_MIPS = 34
2080 R_MIPS_PJUMP R_MIPS = 35
2081 R_MIPS_RELGOT R_MIPS = 36
2082 R_MIPS_JALR R_MIPS = 37
2083
2084 R_MIPS_TLS_DTPMOD32 R_MIPS = 38
2085 R_MIPS_TLS_DTPREL32 R_MIPS = 39
2086 R_MIPS_TLS_DTPMOD64 R_MIPS = 40
2087 R_MIPS_TLS_DTPREL64 R_MIPS = 41
2088 R_MIPS_TLS_GD R_MIPS = 42
2089 R_MIPS_TLS_LDM R_MIPS = 43
2090 R_MIPS_TLS_DTPREL_HI16 R_MIPS = 44
2091 R_MIPS_TLS_DTPREL_LO16 R_MIPS = 45
2092 R_MIPS_TLS_GOTTPREL R_MIPS = 46
2093 R_MIPS_TLS_TPREL32 R_MIPS = 47
2094 R_MIPS_TLS_TPREL64 R_MIPS = 48
2095 R_MIPS_TLS_TPREL_HI16 R_MIPS = 49
2096 R_MIPS_TLS_TPREL_LO16 R_MIPS = 50
2097 )
2098
2099 var rmipsStrings = []intName{
2100 {0, "R_MIPS_NONE"},
2101 {1, "R_MIPS_16"},
2102 {2, "R_MIPS_32"},
2103 {3, "R_MIPS_REL32"},
2104 {4, "R_MIPS_26"},
2105 {5, "R_MIPS_HI16"},
2106 {6, "R_MIPS_LO16"},
2107 {7, "R_MIPS_GPREL16"},
2108 {8, "R_MIPS_LITERAL"},
2109 {9, "R_MIPS_GOT16"},
2110 {10, "R_MIPS_PC16"},
2111 {11, "R_MIPS_CALL16"},
2112 {12, "R_MIPS_GPREL32"},
2113 {16, "R_MIPS_SHIFT5"},
2114 {17, "R_MIPS_SHIFT6"},
2115 {18, "R_MIPS_64"},
2116 {19, "R_MIPS_GOT_DISP"},
2117 {20, "R_MIPS_GOT_PAGE"},
2118 {21, "R_MIPS_GOT_OFST"},
2119 {22, "R_MIPS_GOT_HI16"},
2120 {23, "R_MIPS_GOT_LO16"},
2121 {24, "R_MIPS_SUB"},
2122 {25, "R_MIPS_INSERT_A"},
2123 {26, "R_MIPS_INSERT_B"},
2124 {27, "R_MIPS_DELETE"},
2125 {28, "R_MIPS_HIGHER"},
2126 {29, "R_MIPS_HIGHEST"},
2127 {30, "R_MIPS_CALL_HI16"},
2128 {31, "R_MIPS_CALL_LO16"},
2129 {32, "R_MIPS_SCN_DISP"},
2130 {33, "R_MIPS_REL16"},
2131 {34, "R_MIPS_ADD_IMMEDIATE"},
2132 {35, "R_MIPS_PJUMP"},
2133 {36, "R_MIPS_RELGOT"},
2134 {37, "R_MIPS_JALR"},
2135 {38, "R_MIPS_TLS_DTPMOD32"},
2136 {39, "R_MIPS_TLS_DTPREL32"},
2137 {40, "R_MIPS_TLS_DTPMOD64"},
2138 {41, "R_MIPS_TLS_DTPREL64"},
2139 {42, "R_MIPS_TLS_GD"},
2140 {43, "R_MIPS_TLS_LDM"},
2141 {44, "R_MIPS_TLS_DTPREL_HI16"},
2142 {45, "R_MIPS_TLS_DTPREL_LO16"},
2143 {46, "R_MIPS_TLS_GOTTPREL"},
2144 {47, "R_MIPS_TLS_TPREL32"},
2145 {48, "R_MIPS_TLS_TPREL64"},
2146 {49, "R_MIPS_TLS_TPREL_HI16"},
2147 {50, "R_MIPS_TLS_TPREL_LO16"},
2148 }
2149
2150 func (i R_MIPS) String() string { return stringName(uint32(i), rmipsStrings, false) }
2151 func (i R_MIPS) GoString() string { return stringName(uint32(i), rmipsStrings, true) }
2152
2153
2154
2155
2156
2157
2158
2159 type R_PPC int
2160
2161 const (
2162 R_PPC_NONE R_PPC = 0
2163 R_PPC_ADDR32 R_PPC = 1
2164 R_PPC_ADDR24 R_PPC = 2
2165 R_PPC_ADDR16 R_PPC = 3
2166 R_PPC_ADDR16_LO R_PPC = 4
2167 R_PPC_ADDR16_HI R_PPC = 5
2168 R_PPC_ADDR16_HA R_PPC = 6
2169 R_PPC_ADDR14 R_PPC = 7
2170 R_PPC_ADDR14_BRTAKEN R_PPC = 8
2171 R_PPC_ADDR14_BRNTAKEN R_PPC = 9
2172 R_PPC_REL24 R_PPC = 10
2173 R_PPC_REL14 R_PPC = 11
2174 R_PPC_REL14_BRTAKEN R_PPC = 12
2175 R_PPC_REL14_BRNTAKEN R_PPC = 13
2176 R_PPC_GOT16 R_PPC = 14
2177 R_PPC_GOT16_LO R_PPC = 15
2178 R_PPC_GOT16_HI R_PPC = 16
2179 R_PPC_GOT16_HA R_PPC = 17
2180 R_PPC_PLTREL24 R_PPC = 18
2181 R_PPC_COPY R_PPC = 19
2182 R_PPC_GLOB_DAT R_PPC = 20
2183 R_PPC_JMP_SLOT R_PPC = 21
2184 R_PPC_RELATIVE R_PPC = 22
2185 R_PPC_LOCAL24PC R_PPC = 23
2186 R_PPC_UADDR32 R_PPC = 24
2187 R_PPC_UADDR16 R_PPC = 25
2188 R_PPC_REL32 R_PPC = 26
2189 R_PPC_PLT32 R_PPC = 27
2190 R_PPC_PLTREL32 R_PPC = 28
2191 R_PPC_PLT16_LO R_PPC = 29
2192 R_PPC_PLT16_HI R_PPC = 30
2193 R_PPC_PLT16_HA R_PPC = 31
2194 R_PPC_SDAREL16 R_PPC = 32
2195 R_PPC_SECTOFF R_PPC = 33
2196 R_PPC_SECTOFF_LO R_PPC = 34
2197 R_PPC_SECTOFF_HI R_PPC = 35
2198 R_PPC_SECTOFF_HA R_PPC = 36
2199 R_PPC_TLS R_PPC = 67
2200 R_PPC_DTPMOD32 R_PPC = 68
2201 R_PPC_TPREL16 R_PPC = 69
2202 R_PPC_TPREL16_LO R_PPC = 70
2203 R_PPC_TPREL16_HI R_PPC = 71
2204 R_PPC_TPREL16_HA R_PPC = 72
2205 R_PPC_TPREL32 R_PPC = 73
2206 R_PPC_DTPREL16 R_PPC = 74
2207 R_PPC_DTPREL16_LO R_PPC = 75
2208 R_PPC_DTPREL16_HI R_PPC = 76
2209 R_PPC_DTPREL16_HA R_PPC = 77
2210 R_PPC_DTPREL32 R_PPC = 78
2211 R_PPC_GOT_TLSGD16 R_PPC = 79
2212 R_PPC_GOT_TLSGD16_LO R_PPC = 80
2213 R_PPC_GOT_TLSGD16_HI R_PPC = 81
2214 R_PPC_GOT_TLSGD16_HA R_PPC = 82
2215 R_PPC_GOT_TLSLD16 R_PPC = 83
2216 R_PPC_GOT_TLSLD16_LO R_PPC = 84
2217 R_PPC_GOT_TLSLD16_HI R_PPC = 85
2218 R_PPC_GOT_TLSLD16_HA R_PPC = 86
2219 R_PPC_GOT_TPREL16 R_PPC = 87
2220 R_PPC_GOT_TPREL16_LO R_PPC = 88
2221 R_PPC_GOT_TPREL16_HI R_PPC = 89
2222 R_PPC_GOT_TPREL16_HA R_PPC = 90
2223 R_PPC_EMB_NADDR32 R_PPC = 101
2224 R_PPC_EMB_NADDR16 R_PPC = 102
2225 R_PPC_EMB_NADDR16_LO R_PPC = 103
2226 R_PPC_EMB_NADDR16_HI R_PPC = 104
2227 R_PPC_EMB_NADDR16_HA R_PPC = 105
2228 R_PPC_EMB_SDAI16 R_PPC = 106
2229 R_PPC_EMB_SDA2I16 R_PPC = 107
2230 R_PPC_EMB_SDA2REL R_PPC = 108
2231 R_PPC_EMB_SDA21 R_PPC = 109
2232 R_PPC_EMB_MRKREF R_PPC = 110
2233 R_PPC_EMB_RELSEC16 R_PPC = 111
2234 R_PPC_EMB_RELST_LO R_PPC = 112
2235 R_PPC_EMB_RELST_HI R_PPC = 113
2236 R_PPC_EMB_RELST_HA R_PPC = 114
2237 R_PPC_EMB_BIT_FLD R_PPC = 115
2238 R_PPC_EMB_RELSDA R_PPC = 116
2239 )
2240
2241 var rppcStrings = []intName{
2242 {0, "R_PPC_NONE"},
2243 {1, "R_PPC_ADDR32"},
2244 {2, "R_PPC_ADDR24"},
2245 {3, "R_PPC_ADDR16"},
2246 {4, "R_PPC_ADDR16_LO"},
2247 {5, "R_PPC_ADDR16_HI"},
2248 {6, "R_PPC_ADDR16_HA"},
2249 {7, "R_PPC_ADDR14"},
2250 {8, "R_PPC_ADDR14_BRTAKEN"},
2251 {9, "R_PPC_ADDR14_BRNTAKEN"},
2252 {10, "R_PPC_REL24"},
2253 {11, "R_PPC_REL14"},
2254 {12, "R_PPC_REL14_BRTAKEN"},
2255 {13, "R_PPC_REL14_BRNTAKEN"},
2256 {14, "R_PPC_GOT16"},
2257 {15, "R_PPC_GOT16_LO"},
2258 {16, "R_PPC_GOT16_HI"},
2259 {17, "R_PPC_GOT16_HA"},
2260 {18, "R_PPC_PLTREL24"},
2261 {19, "R_PPC_COPY"},
2262 {20, "R_PPC_GLOB_DAT"},
2263 {21, "R_PPC_JMP_SLOT"},
2264 {22, "R_PPC_RELATIVE"},
2265 {23, "R_PPC_LOCAL24PC"},
2266 {24, "R_PPC_UADDR32"},
2267 {25, "R_PPC_UADDR16"},
2268 {26, "R_PPC_REL32"},
2269 {27, "R_PPC_PLT32"},
2270 {28, "R_PPC_PLTREL32"},
2271 {29, "R_PPC_PLT16_LO"},
2272 {30, "R_PPC_PLT16_HI"},
2273 {31, "R_PPC_PLT16_HA"},
2274 {32, "R_PPC_SDAREL16"},
2275 {33, "R_PPC_SECTOFF"},
2276 {34, "R_PPC_SECTOFF_LO"},
2277 {35, "R_PPC_SECTOFF_HI"},
2278 {36, "R_PPC_SECTOFF_HA"},
2279 {67, "R_PPC_TLS"},
2280 {68, "R_PPC_DTPMOD32"},
2281 {69, "R_PPC_TPREL16"},
2282 {70, "R_PPC_TPREL16_LO"},
2283 {71, "R_PPC_TPREL16_HI"},
2284 {72, "R_PPC_TPREL16_HA"},
2285 {73, "R_PPC_TPREL32"},
2286 {74, "R_PPC_DTPREL16"},
2287 {75, "R_PPC_DTPREL16_LO"},
2288 {76, "R_PPC_DTPREL16_HI"},
2289 {77, "R_PPC_DTPREL16_HA"},
2290 {78, "R_PPC_DTPREL32"},
2291 {79, "R_PPC_GOT_TLSGD16"},
2292 {80, "R_PPC_GOT_TLSGD16_LO"},
2293 {81, "R_PPC_GOT_TLSGD16_HI"},
2294 {82, "R_PPC_GOT_TLSGD16_HA"},
2295 {83, "R_PPC_GOT_TLSLD16"},
2296 {84, "R_PPC_GOT_TLSLD16_LO"},
2297 {85, "R_PPC_GOT_TLSLD16_HI"},
2298 {86, "R_PPC_GOT_TLSLD16_HA"},
2299 {87, "R_PPC_GOT_TPREL16"},
2300 {88, "R_PPC_GOT_TPREL16_LO"},
2301 {89, "R_PPC_GOT_TPREL16_HI"},
2302 {90, "R_PPC_GOT_TPREL16_HA"},
2303 {101, "R_PPC_EMB_NADDR32"},
2304 {102, "R_PPC_EMB_NADDR16"},
2305 {103, "R_PPC_EMB_NADDR16_LO"},
2306 {104, "R_PPC_EMB_NADDR16_HI"},
2307 {105, "R_PPC_EMB_NADDR16_HA"},
2308 {106, "R_PPC_EMB_SDAI16"},
2309 {107, "R_PPC_EMB_SDA2I16"},
2310 {108, "R_PPC_EMB_SDA2REL"},
2311 {109, "R_PPC_EMB_SDA21"},
2312 {110, "R_PPC_EMB_MRKREF"},
2313 {111, "R_PPC_EMB_RELSEC16"},
2314 {112, "R_PPC_EMB_RELST_LO"},
2315 {113, "R_PPC_EMB_RELST_HI"},
2316 {114, "R_PPC_EMB_RELST_HA"},
2317 {115, "R_PPC_EMB_BIT_FLD"},
2318 {116, "R_PPC_EMB_RELSDA"},
2319 }
2320
2321 func (i R_PPC) String() string { return stringName(uint32(i), rppcStrings, false) }
2322 func (i R_PPC) GoString() string { return stringName(uint32(i), rppcStrings, true) }
2323
2324
2325
2326
2327
2328
2329
2330 type R_PPC64 int
2331
2332 const (
2333 R_PPC64_NONE R_PPC64 = 0
2334 R_PPC64_ADDR32 R_PPC64 = 1
2335 R_PPC64_ADDR24 R_PPC64 = 2
2336 R_PPC64_ADDR16 R_PPC64 = 3
2337 R_PPC64_ADDR16_LO R_PPC64 = 4
2338 R_PPC64_ADDR16_HI R_PPC64 = 5
2339 R_PPC64_ADDR16_HA R_PPC64 = 6
2340 R_PPC64_ADDR14 R_PPC64 = 7
2341 R_PPC64_ADDR14_BRTAKEN R_PPC64 = 8
2342 R_PPC64_ADDR14_BRNTAKEN R_PPC64 = 9
2343 R_PPC64_REL24 R_PPC64 = 10
2344 R_PPC64_REL14 R_PPC64 = 11
2345 R_PPC64_REL14_BRTAKEN R_PPC64 = 12
2346 R_PPC64_REL14_BRNTAKEN R_PPC64 = 13
2347 R_PPC64_GOT16 R_PPC64 = 14
2348 R_PPC64_GOT16_LO R_PPC64 = 15
2349 R_PPC64_GOT16_HI R_PPC64 = 16
2350 R_PPC64_GOT16_HA R_PPC64 = 17
2351 R_PPC64_JMP_SLOT R_PPC64 = 21
2352 R_PPC64_RELATIVE R_PPC64 = 22
2353 R_PPC64_REL32 R_PPC64 = 26
2354 R_PPC64_ADDR64 R_PPC64 = 38
2355 R_PPC64_ADDR16_HIGHER R_PPC64 = 39
2356 R_PPC64_ADDR16_HIGHERA R_PPC64 = 40
2357 R_PPC64_ADDR16_HIGHEST R_PPC64 = 41
2358 R_PPC64_ADDR16_HIGHESTA R_PPC64 = 42
2359 R_PPC64_REL64 R_PPC64 = 44
2360 R_PPC64_TOC16 R_PPC64 = 47
2361 R_PPC64_TOC16_LO R_PPC64 = 48
2362 R_PPC64_TOC16_HI R_PPC64 = 49
2363 R_PPC64_TOC16_HA R_PPC64 = 50
2364 R_PPC64_TOC R_PPC64 = 51
2365 R_PPC64_PLTGOT16 R_PPC64 = 52
2366 R_PPC64_PLTGOT16_LO R_PPC64 = 53
2367 R_PPC64_PLTGOT16_HI R_PPC64 = 54
2368 R_PPC64_PLTGOT16_HA R_PPC64 = 55
2369 R_PPC64_ADDR16_DS R_PPC64 = 56
2370 R_PPC64_ADDR16_LO_DS R_PPC64 = 57
2371 R_PPC64_GOT16_DS R_PPC64 = 58
2372 R_PPC64_GOT16_LO_DS R_PPC64 = 59
2373 R_PPC64_PLT16_LO_DS R_PPC64 = 60
2374 R_PPC64_SECTOFF_DS R_PPC64 = 61
2375 R_PPC64_SECTOFF_LO_DS R_PPC64 = 61
2376 R_PPC64_TOC16_DS R_PPC64 = 63
2377 R_PPC64_TOC16_LO_DS R_PPC64 = 64
2378 R_PPC64_PLTGOT16_DS R_PPC64 = 65
2379 R_PPC64_PLTGOT_LO_DS R_PPC64 = 66
2380 R_PPC64_TLS R_PPC64 = 67
2381 R_PPC64_DTPMOD64 R_PPC64 = 68
2382 R_PPC64_TPREL16 R_PPC64 = 69
2383 R_PPC64_TPREL16_LO R_PPC64 = 70
2384 R_PPC64_TPREL16_HI R_PPC64 = 71
2385 R_PPC64_TPREL16_HA R_PPC64 = 72
2386 R_PPC64_TPREL64 R_PPC64 = 73
2387 R_PPC64_DTPREL16 R_PPC64 = 74
2388 R_PPC64_DTPREL16_LO R_PPC64 = 75
2389 R_PPC64_DTPREL16_HI R_PPC64 = 76
2390 R_PPC64_DTPREL16_HA R_PPC64 = 77
2391 R_PPC64_DTPREL64 R_PPC64 = 78
2392 R_PPC64_GOT_TLSGD16 R_PPC64 = 79
2393 R_PPC64_GOT_TLSGD16_LO R_PPC64 = 80
2394 R_PPC64_GOT_TLSGD16_HI R_PPC64 = 81
2395 R_PPC64_GOT_TLSGD16_HA R_PPC64 = 82
2396 R_PPC64_GOT_TLSLD16 R_PPC64 = 83
2397 R_PPC64_GOT_TLSLD16_LO R_PPC64 = 84
2398 R_PPC64_GOT_TLSLD16_HI R_PPC64 = 85
2399 R_PPC64_GOT_TLSLD16_HA R_PPC64 = 86
2400 R_PPC64_GOT_TPREL16_DS R_PPC64 = 87
2401 R_PPC64_GOT_TPREL16_LO_DS R_PPC64 = 88
2402 R_PPC64_GOT_TPREL16_HI R_PPC64 = 89
2403 R_PPC64_GOT_TPREL16_HA R_PPC64 = 90
2404 R_PPC64_GOT_DTPREL16_DS R_PPC64 = 91
2405 R_PPC64_GOT_DTPREL16_LO_DS R_PPC64 = 92
2406 R_PPC64_GOT_DTPREL16_HI R_PPC64 = 93
2407 R_PPC64_GOT_DTPREL16_HA R_PPC64 = 94
2408 R_PPC64_TPREL16_DS R_PPC64 = 95
2409 R_PPC64_TPREL16_LO_DS R_PPC64 = 96
2410 R_PPC64_TPREL16_HIGHER R_PPC64 = 97
2411 R_PPC64_TPREL16_HIGHERA R_PPC64 = 98
2412 R_PPC64_TPREL16_HIGHEST R_PPC64 = 99
2413 R_PPC64_TPREL16_HIGHESTA R_PPC64 = 100
2414 R_PPC64_DTPREL16_DS R_PPC64 = 101
2415 R_PPC64_DTPREL16_LO_DS R_PPC64 = 102
2416 R_PPC64_DTPREL16_HIGHER R_PPC64 = 103
2417 R_PPC64_DTPREL16_HIGHERA R_PPC64 = 104
2418 R_PPC64_DTPREL16_HIGHEST R_PPC64 = 105
2419 R_PPC64_DTPREL16_HIGHESTA R_PPC64 = 106
2420 R_PPC64_TLSGD R_PPC64 = 107
2421 R_PPC64_TLSLD R_PPC64 = 108
2422 R_PPC64_TOCSAVE R_PPC64 = 109
2423 R_PPC64_ADDR16_HIGH R_PPC64 = 110
2424 R_PPC64_ADDR16_HIGHA R_PPC64 = 111
2425 R_PPC64_TPREL16_HIGH R_PPC64 = 112
2426 R_PPC64_TPREL16_HIGHA R_PPC64 = 113
2427 R_PPC64_DTPREL16_HIGH R_PPC64 = 114
2428 R_PPC64_DTPREL16_HIGHA R_PPC64 = 115
2429 R_PPC64_REL24_NOTOC R_PPC64 = 116
2430 R_PPC64_ADDR64_LOCAL R_PPC64 = 117
2431 R_PPC64_ENTRY R_PPC64 = 118
2432 R_PPC64_REL16DX_HA R_PPC64 = 246
2433 R_PPC64_JMP_IREL R_PPC64 = 247
2434 R_PPC64_IRELATIVE R_PPC64 = 248
2435 R_PPC64_REL16 R_PPC64 = 249
2436 R_PPC64_REL16_LO R_PPC64 = 250
2437 R_PPC64_REL16_HI R_PPC64 = 251
2438 R_PPC64_REL16_HA R_PPC64 = 252
2439 )
2440
2441 var rppc64Strings = []intName{
2442 {0, "R_PPC64_NONE"},
2443 {1, "R_PPC64_ADDR32"},
2444 {2, "R_PPC64_ADDR24"},
2445 {3, "R_PPC64_ADDR16"},
2446 {4, "R_PPC64_ADDR16_LO"},
2447 {5, "R_PPC64_ADDR16_HI"},
2448 {6, "R_PPC64_ADDR16_HA"},
2449 {7, "R_PPC64_ADDR14"},
2450 {8, "R_PPC64_ADDR14_BRTAKEN"},
2451 {9, "R_PPC64_ADDR14_BRNTAKEN"},
2452 {10, "R_PPC64_REL24"},
2453 {11, "R_PPC64_REL14"},
2454 {12, "R_PPC64_REL14_BRTAKEN"},
2455 {13, "R_PPC64_REL14_BRNTAKEN"},
2456 {14, "R_PPC64_GOT16"},
2457 {15, "R_PPC64_GOT16_LO"},
2458 {16, "R_PPC64_GOT16_HI"},
2459 {17, "R_PPC64_GOT16_HA"},
2460 {21, "R_PPC64_JMP_SLOT"},
2461 {22, "R_PPC64_RELATIVE"},
2462 {26, "R_PPC64_REL32"},
2463 {38, "R_PPC64_ADDR64"},
2464 {39, "R_PPC64_ADDR16_HIGHER"},
2465 {40, "R_PPC64_ADDR16_HIGHERA"},
2466 {41, "R_PPC64_ADDR16_HIGHEST"},
2467 {42, "R_PPC64_ADDR16_HIGHESTA"},
2468 {44, "R_PPC64_REL64"},
2469 {47, "R_PPC64_TOC16"},
2470 {48, "R_PPC64_TOC16_LO"},
2471 {49, "R_PPC64_TOC16_HI"},
2472 {50, "R_PPC64_TOC16_HA"},
2473 {51, "R_PPC64_TOC"},
2474 {52, "R_PPC64_PLTGOT16"},
2475 {53, "R_PPC64_PLTGOT16_LO"},
2476 {54, "R_PPC64_PLTGOT16_HI"},
2477 {55, "R_PPC64_PLTGOT16_HA"},
2478 {56, "R_PPC64_ADDR16_DS"},
2479 {57, "R_PPC64_ADDR16_LO_DS"},
2480 {58, "R_PPC64_GOT16_DS"},
2481 {59, "R_PPC64_GOT16_LO_DS"},
2482 {60, "R_PPC64_PLT16_LO_DS"},
2483 {61, "R_PPC64_SECTOFF_DS"},
2484 {61, "R_PPC64_SECTOFF_LO_DS"},
2485 {63, "R_PPC64_TOC16_DS"},
2486 {64, "R_PPC64_TOC16_LO_DS"},
2487 {65, "R_PPC64_PLTGOT16_DS"},
2488 {66, "R_PPC64_PLTGOT_LO_DS"},
2489 {67, "R_PPC64_TLS"},
2490 {68, "R_PPC64_DTPMOD64"},
2491 {69, "R_PPC64_TPREL16"},
2492 {70, "R_PPC64_TPREL16_LO"},
2493 {71, "R_PPC64_TPREL16_HI"},
2494 {72, "R_PPC64_TPREL16_HA"},
2495 {73, "R_PPC64_TPREL64"},
2496 {74, "R_PPC64_DTPREL16"},
2497 {75, "R_PPC64_DTPREL16_LO"},
2498 {76, "R_PPC64_DTPREL16_HI"},
2499 {77, "R_PPC64_DTPREL16_HA"},
2500 {78, "R_PPC64_DTPREL64"},
2501 {79, "R_PPC64_GOT_TLSGD16"},
2502 {80, "R_PPC64_GOT_TLSGD16_LO"},
2503 {81, "R_PPC64_GOT_TLSGD16_HI"},
2504 {82, "R_PPC64_GOT_TLSGD16_HA"},
2505 {83, "R_PPC64_GOT_TLSLD16"},
2506 {84, "R_PPC64_GOT_TLSLD16_LO"},
2507 {85, "R_PPC64_GOT_TLSLD16_HI"},
2508 {86, "R_PPC64_GOT_TLSLD16_HA"},
2509 {87, "R_PPC64_GOT_TPREL16_DS"},
2510 {88, "R_PPC64_GOT_TPREL16_LO_DS"},
2511 {89, "R_PPC64_GOT_TPREL16_HI"},
2512 {90, "R_PPC64_GOT_TPREL16_HA"},
2513 {91, "R_PPC64_GOT_DTPREL16_DS"},
2514 {92, "R_PPC64_GOT_DTPREL16_LO_DS"},
2515 {93, "R_PPC64_GOT_DTPREL16_HI"},
2516 {94, "R_PPC64_GOT_DTPREL16_HA"},
2517 {95, "R_PPC64_TPREL16_DS"},
2518 {96, "R_PPC64_TPREL16_LO_DS"},
2519 {97, "R_PPC64_TPREL16_HIGHER"},
2520 {98, "R_PPC64_TPREL16_HIGHERA"},
2521 {99, "R_PPC64_TPREL16_HIGHEST"},
2522 {100, "R_PPC64_TPREL16_HIGHESTA"},
2523 {101, "R_PPC64_DTPREL16_DS"},
2524 {102, "R_PPC64_DTPREL16_LO_DS"},
2525 {103, "R_PPC64_DTPREL16_HIGHER"},
2526 {104, "R_PPC64_DTPREL16_HIGHERA"},
2527 {105, "R_PPC64_DTPREL16_HIGHEST"},
2528 {106, "R_PPC64_DTPREL16_HIGHESTA"},
2529 {107, "R_PPC64_TLSGD"},
2530 {108, "R_PPC64_TLSLD"},
2531 {109, "R_PPC64_TOCSAVE"},
2532 {110, "R_PPC64_ADDR16_HIGH"},
2533 {111, "R_PPC64_ADDR16_HIGHA"},
2534 {112, "R_PPC64_TPREL16_HIGH"},
2535 {113, "R_PPC64_TPREL16_HIGHA"},
2536 {114, "R_PPC64_DTPREL16_HIGH"},
2537 {115, "R_PPC64_DTPREL16_HIGHA"},
2538 {116, "R_PPC64_REL24_NOTOC"},
2539 {117, "R_PPC64_ADDR64_LOCAL"},
2540 {118, "R_PPC64_ENTRY"},
2541 {246, "R_PPC64_REL16DX_HA"},
2542 {247, "R_PPC64_JMP_IREL"},
2543 {248, "R_PPC64_IRELATIVE"},
2544 {249, "R_PPC64_REL16"},
2545 {250, "R_PPC64_REL16_LO"},
2546 {251, "R_PPC64_REL16_HI"},
2547 {252, "R_PPC64_REL16_HA"},
2548 }
2549
2550 func (i R_PPC64) String() string { return stringName(uint32(i), rppc64Strings, false) }
2551 func (i R_PPC64) GoString() string { return stringName(uint32(i), rppc64Strings, true) }
2552
2553
2554 type R_RISCV int
2555
2556 const (
2557 R_RISCV_NONE R_RISCV = 0
2558 R_RISCV_32 R_RISCV = 1
2559 R_RISCV_64 R_RISCV = 2
2560 R_RISCV_RELATIVE R_RISCV = 3
2561 R_RISCV_COPY R_RISCV = 4
2562 R_RISCV_JUMP_SLOT R_RISCV = 5
2563 R_RISCV_TLS_DTPMOD32 R_RISCV = 6
2564 R_RISCV_TLS_DTPMOD64 R_RISCV = 7
2565 R_RISCV_TLS_DTPREL32 R_RISCV = 8
2566 R_RISCV_TLS_DTPREL64 R_RISCV = 9
2567 R_RISCV_TLS_TPREL32 R_RISCV = 10
2568 R_RISCV_TLS_TPREL64 R_RISCV = 11
2569 R_RISCV_BRANCH R_RISCV = 16
2570 R_RISCV_JAL R_RISCV = 17
2571 R_RISCV_CALL R_RISCV = 18
2572 R_RISCV_CALL_PLT R_RISCV = 19
2573 R_RISCV_GOT_HI20 R_RISCV = 20
2574 R_RISCV_TLS_GOT_HI20 R_RISCV = 21
2575 R_RISCV_TLS_GD_HI20 R_RISCV = 22
2576 R_RISCV_PCREL_HI20 R_RISCV = 23
2577 R_RISCV_PCREL_LO12_I R_RISCV = 24
2578 R_RISCV_PCREL_LO12_S R_RISCV = 25
2579 R_RISCV_HI20 R_RISCV = 26
2580 R_RISCV_LO12_I R_RISCV = 27
2581 R_RISCV_LO12_S R_RISCV = 28
2582 R_RISCV_TPREL_HI20 R_RISCV = 29
2583 R_RISCV_TPREL_LO12_I R_RISCV = 30
2584 R_RISCV_TPREL_LO12_S R_RISCV = 31
2585 R_RISCV_TPREL_ADD R_RISCV = 32
2586 R_RISCV_ADD8 R_RISCV = 33
2587 R_RISCV_ADD16 R_RISCV = 34
2588 R_RISCV_ADD32 R_RISCV = 35
2589 R_RISCV_ADD64 R_RISCV = 36
2590 R_RISCV_SUB8 R_RISCV = 37
2591 R_RISCV_SUB16 R_RISCV = 38
2592 R_RISCV_SUB32 R_RISCV = 39
2593 R_RISCV_SUB64 R_RISCV = 40
2594 R_RISCV_GNU_VTINHERIT R_RISCV = 41
2595 R_RISCV_GNU_VTENTRY R_RISCV = 42
2596 R_RISCV_ALIGN R_RISCV = 43
2597 R_RISCV_RVC_BRANCH R_RISCV = 44
2598 R_RISCV_RVC_JUMP R_RISCV = 45
2599 R_RISCV_RVC_LUI R_RISCV = 46
2600 R_RISCV_GPREL_I R_RISCV = 47
2601 R_RISCV_GPREL_S R_RISCV = 48
2602 R_RISCV_TPREL_I R_RISCV = 49
2603 R_RISCV_TPREL_S R_RISCV = 50
2604 R_RISCV_RELAX R_RISCV = 51
2605 R_RISCV_SUB6 R_RISCV = 52
2606 R_RISCV_SET6 R_RISCV = 53
2607 R_RISCV_SET8 R_RISCV = 54
2608 R_RISCV_SET16 R_RISCV = 55
2609 R_RISCV_SET32 R_RISCV = 56
2610 R_RISCV_32_PCREL R_RISCV = 57
2611 )
2612
2613 var rriscvStrings = []intName{
2614 {0, "R_RISCV_NONE"},
2615 {1, "R_RISCV_32"},
2616 {2, "R_RISCV_64"},
2617 {3, "R_RISCV_RELATIVE"},
2618 {4, "R_RISCV_COPY"},
2619 {5, "R_RISCV_JUMP_SLOT"},
2620 {6, "R_RISCV_TLS_DTPMOD32"},
2621 {7, "R_RISCV_TLS_DTPMOD64"},
2622 {8, "R_RISCV_TLS_DTPREL32"},
2623 {9, "R_RISCV_TLS_DTPREL64"},
2624 {10, "R_RISCV_TLS_TPREL32"},
2625 {11, "R_RISCV_TLS_TPREL64"},
2626 {16, "R_RISCV_BRANCH"},
2627 {17, "R_RISCV_JAL"},
2628 {18, "R_RISCV_CALL"},
2629 {19, "R_RISCV_CALL_PLT"},
2630 {20, "R_RISCV_GOT_HI20"},
2631 {21, "R_RISCV_TLS_GOT_HI20"},
2632 {22, "R_RISCV_TLS_GD_HI20"},
2633 {23, "R_RISCV_PCREL_HI20"},
2634 {24, "R_RISCV_PCREL_LO12_I"},
2635 {25, "R_RISCV_PCREL_LO12_S"},
2636 {26, "R_RISCV_HI20"},
2637 {27, "R_RISCV_LO12_I"},
2638 {28, "R_RISCV_LO12_S"},
2639 {29, "R_RISCV_TPREL_HI20"},
2640 {30, "R_RISCV_TPREL_LO12_I"},
2641 {31, "R_RISCV_TPREL_LO12_S"},
2642 {32, "R_RISCV_TPREL_ADD"},
2643 {33, "R_RISCV_ADD8"},
2644 {34, "R_RISCV_ADD16"},
2645 {35, "R_RISCV_ADD32"},
2646 {36, "R_RISCV_ADD64"},
2647 {37, "R_RISCV_SUB8"},
2648 {38, "R_RISCV_SUB16"},
2649 {39, "R_RISCV_SUB32"},
2650 {40, "R_RISCV_SUB64"},
2651 {41, "R_RISCV_GNU_VTINHERIT"},
2652 {42, "R_RISCV_GNU_VTENTRY"},
2653 {43, "R_RISCV_ALIGN"},
2654 {44, "R_RISCV_RVC_BRANCH"},
2655 {45, "R_RISCV_RVC_JUMP"},
2656 {46, "R_RISCV_RVC_LUI"},
2657 {47, "R_RISCV_GPREL_I"},
2658 {48, "R_RISCV_GPREL_S"},
2659 {49, "R_RISCV_TPREL_I"},
2660 {50, "R_RISCV_TPREL_S"},
2661 {51, "R_RISCV_RELAX"},
2662 {52, "R_RISCV_SUB6"},
2663 {53, "R_RISCV_SET6"},
2664 {54, "R_RISCV_SET8"},
2665 {55, "R_RISCV_SET16"},
2666 {56, "R_RISCV_SET32"},
2667 {57, "R_RISCV_32_PCREL"},
2668 }
2669
2670 func (i R_RISCV) String() string { return stringName(uint32(i), rriscvStrings, false) }
2671 func (i R_RISCV) GoString() string { return stringName(uint32(i), rriscvStrings, true) }
2672
2673
2674 type R_390 int
2675
2676 const (
2677 R_390_NONE R_390 = 0
2678 R_390_8 R_390 = 1
2679 R_390_12 R_390 = 2
2680 R_390_16 R_390 = 3
2681 R_390_32 R_390 = 4
2682 R_390_PC32 R_390 = 5
2683 R_390_GOT12 R_390 = 6
2684 R_390_GOT32 R_390 = 7
2685 R_390_PLT32 R_390 = 8
2686 R_390_COPY R_390 = 9
2687 R_390_GLOB_DAT R_390 = 10
2688 R_390_JMP_SLOT R_390 = 11
2689 R_390_RELATIVE R_390 = 12
2690 R_390_GOTOFF R_390 = 13
2691 R_390_GOTPC R_390 = 14
2692 R_390_GOT16 R_390 = 15
2693 R_390_PC16 R_390 = 16
2694 R_390_PC16DBL R_390 = 17
2695 R_390_PLT16DBL R_390 = 18
2696 R_390_PC32DBL R_390 = 19
2697 R_390_PLT32DBL R_390 = 20
2698 R_390_GOTPCDBL R_390 = 21
2699 R_390_64 R_390 = 22
2700 R_390_PC64 R_390 = 23
2701 R_390_GOT64 R_390 = 24
2702 R_390_PLT64 R_390 = 25
2703 R_390_GOTENT R_390 = 26
2704 R_390_GOTOFF16 R_390 = 27
2705 R_390_GOTOFF64 R_390 = 28
2706 R_390_GOTPLT12 R_390 = 29
2707 R_390_GOTPLT16 R_390 = 30
2708 R_390_GOTPLT32 R_390 = 31
2709 R_390_GOTPLT64 R_390 = 32
2710 R_390_GOTPLTENT R_390 = 33
2711 R_390_GOTPLTOFF16 R_390 = 34
2712 R_390_GOTPLTOFF32 R_390 = 35
2713 R_390_GOTPLTOFF64 R_390 = 36
2714 R_390_TLS_LOAD R_390 = 37
2715 R_390_TLS_GDCALL R_390 = 38
2716 R_390_TLS_LDCALL R_390 = 39
2717 R_390_TLS_GD32 R_390 = 40
2718 R_390_TLS_GD64 R_390 = 41
2719 R_390_TLS_GOTIE12 R_390 = 42
2720 R_390_TLS_GOTIE32 R_390 = 43
2721 R_390_TLS_GOTIE64 R_390 = 44
2722 R_390_TLS_LDM32 R_390 = 45
2723 R_390_TLS_LDM64 R_390 = 46
2724 R_390_TLS_IE32 R_390 = 47
2725 R_390_TLS_IE64 R_390 = 48
2726 R_390_TLS_IEENT R_390 = 49
2727 R_390_TLS_LE32 R_390 = 50
2728 R_390_TLS_LE64 R_390 = 51
2729 R_390_TLS_LDO32 R_390 = 52
2730 R_390_TLS_LDO64 R_390 = 53
2731 R_390_TLS_DTPMOD R_390 = 54
2732 R_390_TLS_DTPOFF R_390 = 55
2733 R_390_TLS_TPOFF R_390 = 56
2734 R_390_20 R_390 = 57
2735 R_390_GOT20 R_390 = 58
2736 R_390_GOTPLT20 R_390 = 59
2737 R_390_TLS_GOTIE20 R_390 = 60
2738 )
2739
2740 var r390Strings = []intName{
2741 {0, "R_390_NONE"},
2742 {1, "R_390_8"},
2743 {2, "R_390_12"},
2744 {3, "R_390_16"},
2745 {4, "R_390_32"},
2746 {5, "R_390_PC32"},
2747 {6, "R_390_GOT12"},
2748 {7, "R_390_GOT32"},
2749 {8, "R_390_PLT32"},
2750 {9, "R_390_COPY"},
2751 {10, "R_390_GLOB_DAT"},
2752 {11, "R_390_JMP_SLOT"},
2753 {12, "R_390_RELATIVE"},
2754 {13, "R_390_GOTOFF"},
2755 {14, "R_390_GOTPC"},
2756 {15, "R_390_GOT16"},
2757 {16, "R_390_PC16"},
2758 {17, "R_390_PC16DBL"},
2759 {18, "R_390_PLT16DBL"},
2760 {19, "R_390_PC32DBL"},
2761 {20, "R_390_PLT32DBL"},
2762 {21, "R_390_GOTPCDBL"},
2763 {22, "R_390_64"},
2764 {23, "R_390_PC64"},
2765 {24, "R_390_GOT64"},
2766 {25, "R_390_PLT64"},
2767 {26, "R_390_GOTENT"},
2768 {27, "R_390_GOTOFF16"},
2769 {28, "R_390_GOTOFF64"},
2770 {29, "R_390_GOTPLT12"},
2771 {30, "R_390_GOTPLT16"},
2772 {31, "R_390_GOTPLT32"},
2773 {32, "R_390_GOTPLT64"},
2774 {33, "R_390_GOTPLTENT"},
2775 {34, "R_390_GOTPLTOFF16"},
2776 {35, "R_390_GOTPLTOFF32"},
2777 {36, "R_390_GOTPLTOFF64"},
2778 {37, "R_390_TLS_LOAD"},
2779 {38, "R_390_TLS_GDCALL"},
2780 {39, "R_390_TLS_LDCALL"},
2781 {40, "R_390_TLS_GD32"},
2782 {41, "R_390_TLS_GD64"},
2783 {42, "R_390_TLS_GOTIE12"},
2784 {43, "R_390_TLS_GOTIE32"},
2785 {44, "R_390_TLS_GOTIE64"},
2786 {45, "R_390_TLS_LDM32"},
2787 {46, "R_390_TLS_LDM64"},
2788 {47, "R_390_TLS_IE32"},
2789 {48, "R_390_TLS_IE64"},
2790 {49, "R_390_TLS_IEENT"},
2791 {50, "R_390_TLS_LE32"},
2792 {51, "R_390_TLS_LE64"},
2793 {52, "R_390_TLS_LDO32"},
2794 {53, "R_390_TLS_LDO64"},
2795 {54, "R_390_TLS_DTPMOD"},
2796 {55, "R_390_TLS_DTPOFF"},
2797 {56, "R_390_TLS_TPOFF"},
2798 {57, "R_390_20"},
2799 {58, "R_390_GOT20"},
2800 {59, "R_390_GOTPLT20"},
2801 {60, "R_390_TLS_GOTIE20"},
2802 }
2803
2804 func (i R_390) String() string { return stringName(uint32(i), r390Strings, false) }
2805 func (i R_390) GoString() string { return stringName(uint32(i), r390Strings, true) }
2806
2807
2808 type R_SPARC int
2809
2810 const (
2811 R_SPARC_NONE R_SPARC = 0
2812 R_SPARC_8 R_SPARC = 1
2813 R_SPARC_16 R_SPARC = 2
2814 R_SPARC_32 R_SPARC = 3
2815 R_SPARC_DISP8 R_SPARC = 4
2816 R_SPARC_DISP16 R_SPARC = 5
2817 R_SPARC_DISP32 R_SPARC = 6
2818 R_SPARC_WDISP30 R_SPARC = 7
2819 R_SPARC_WDISP22 R_SPARC = 8
2820 R_SPARC_HI22 R_SPARC = 9
2821 R_SPARC_22 R_SPARC = 10
2822 R_SPARC_13 R_SPARC = 11
2823 R_SPARC_LO10 R_SPARC = 12
2824 R_SPARC_GOT10 R_SPARC = 13
2825 R_SPARC_GOT13 R_SPARC = 14
2826 R_SPARC_GOT22 R_SPARC = 15
2827 R_SPARC_PC10 R_SPARC = 16
2828 R_SPARC_PC22 R_SPARC = 17
2829 R_SPARC_WPLT30 R_SPARC = 18
2830 R_SPARC_COPY R_SPARC = 19
2831 R_SPARC_GLOB_DAT R_SPARC = 20
2832 R_SPARC_JMP_SLOT R_SPARC = 21
2833 R_SPARC_RELATIVE R_SPARC = 22
2834 R_SPARC_UA32 R_SPARC = 23
2835 R_SPARC_PLT32 R_SPARC = 24
2836 R_SPARC_HIPLT22 R_SPARC = 25
2837 R_SPARC_LOPLT10 R_SPARC = 26
2838 R_SPARC_PCPLT32 R_SPARC = 27
2839 R_SPARC_PCPLT22 R_SPARC = 28
2840 R_SPARC_PCPLT10 R_SPARC = 29
2841 R_SPARC_10 R_SPARC = 30
2842 R_SPARC_11 R_SPARC = 31
2843 R_SPARC_64 R_SPARC = 32
2844 R_SPARC_OLO10 R_SPARC = 33
2845 R_SPARC_HH22 R_SPARC = 34
2846 R_SPARC_HM10 R_SPARC = 35
2847 R_SPARC_LM22 R_SPARC = 36
2848 R_SPARC_PC_HH22 R_SPARC = 37
2849 R_SPARC_PC_HM10 R_SPARC = 38
2850 R_SPARC_PC_LM22 R_SPARC = 39
2851 R_SPARC_WDISP16 R_SPARC = 40
2852 R_SPARC_WDISP19 R_SPARC = 41
2853 R_SPARC_GLOB_JMP R_SPARC = 42
2854 R_SPARC_7 R_SPARC = 43
2855 R_SPARC_5 R_SPARC = 44
2856 R_SPARC_6 R_SPARC = 45
2857 R_SPARC_DISP64 R_SPARC = 46
2858 R_SPARC_PLT64 R_SPARC = 47
2859 R_SPARC_HIX22 R_SPARC = 48
2860 R_SPARC_LOX10 R_SPARC = 49
2861 R_SPARC_H44 R_SPARC = 50
2862 R_SPARC_M44 R_SPARC = 51
2863 R_SPARC_L44 R_SPARC = 52
2864 R_SPARC_REGISTER R_SPARC = 53
2865 R_SPARC_UA64 R_SPARC = 54
2866 R_SPARC_UA16 R_SPARC = 55
2867 )
2868
2869 var rsparcStrings = []intName{
2870 {0, "R_SPARC_NONE"},
2871 {1, "R_SPARC_8"},
2872 {2, "R_SPARC_16"},
2873 {3, "R_SPARC_32"},
2874 {4, "R_SPARC_DISP8"},
2875 {5, "R_SPARC_DISP16"},
2876 {6, "R_SPARC_DISP32"},
2877 {7, "R_SPARC_WDISP30"},
2878 {8, "R_SPARC_WDISP22"},
2879 {9, "R_SPARC_HI22"},
2880 {10, "R_SPARC_22"},
2881 {11, "R_SPARC_13"},
2882 {12, "R_SPARC_LO10"},
2883 {13, "R_SPARC_GOT10"},
2884 {14, "R_SPARC_GOT13"},
2885 {15, "R_SPARC_GOT22"},
2886 {16, "R_SPARC_PC10"},
2887 {17, "R_SPARC_PC22"},
2888 {18, "R_SPARC_WPLT30"},
2889 {19, "R_SPARC_COPY"},
2890 {20, "R_SPARC_GLOB_DAT"},
2891 {21, "R_SPARC_JMP_SLOT"},
2892 {22, "R_SPARC_RELATIVE"},
2893 {23, "R_SPARC_UA32"},
2894 {24, "R_SPARC_PLT32"},
2895 {25, "R_SPARC_HIPLT22"},
2896 {26, "R_SPARC_LOPLT10"},
2897 {27, "R_SPARC_PCPLT32"},
2898 {28, "R_SPARC_PCPLT22"},
2899 {29, "R_SPARC_PCPLT10"},
2900 {30, "R_SPARC_10"},
2901 {31, "R_SPARC_11"},
2902 {32, "R_SPARC_64"},
2903 {33, "R_SPARC_OLO10"},
2904 {34, "R_SPARC_HH22"},
2905 {35, "R_SPARC_HM10"},
2906 {36, "R_SPARC_LM22"},
2907 {37, "R_SPARC_PC_HH22"},
2908 {38, "R_SPARC_PC_HM10"},
2909 {39, "R_SPARC_PC_LM22"},
2910 {40, "R_SPARC_WDISP16"},
2911 {41, "R_SPARC_WDISP19"},
2912 {42, "R_SPARC_GLOB_JMP"},
2913 {43, "R_SPARC_7"},
2914 {44, "R_SPARC_5"},
2915 {45, "R_SPARC_6"},
2916 {46, "R_SPARC_DISP64"},
2917 {47, "R_SPARC_PLT64"},
2918 {48, "R_SPARC_HIX22"},
2919 {49, "R_SPARC_LOX10"},
2920 {50, "R_SPARC_H44"},
2921 {51, "R_SPARC_M44"},
2922 {52, "R_SPARC_L44"},
2923 {53, "R_SPARC_REGISTER"},
2924 {54, "R_SPARC_UA64"},
2925 {55, "R_SPARC_UA16"},
2926 }
2927
2928 func (i R_SPARC) String() string { return stringName(uint32(i), rsparcStrings, false) }
2929 func (i R_SPARC) GoString() string { return stringName(uint32(i), rsparcStrings, true) }
2930
2931
2932 const ARM_MAGIC_TRAMP_NUMBER = 0x5c000003
2933
2934
2935 type Header32 struct {
2936 Ident [EI_NIDENT]byte
2937 Type uint16
2938 Machine uint16
2939 Version uint32
2940 Entry uint32
2941 Phoff uint32
2942 Shoff uint32
2943 Flags uint32
2944 Ehsize uint16
2945 Phentsize uint16
2946 Phnum uint16
2947 Shentsize uint16
2948 Shnum uint16
2949 Shstrndx uint16
2950 }
2951
2952
2953 type Section32 struct {
2954 Name uint32
2955 Type uint32
2956 Flags uint32
2957 Addr uint32
2958 Off uint32
2959 Size uint32
2960 Link uint32
2961 Info uint32
2962 Addralign uint32
2963 Entsize uint32
2964 }
2965
2966
2967 type Prog32 struct {
2968 Type uint32
2969 Off uint32
2970 Vaddr uint32
2971 Paddr uint32
2972 Filesz uint32
2973 Memsz uint32
2974 Flags uint32
2975 Align uint32
2976 }
2977
2978
2979 type Dyn32 struct {
2980 Tag int32
2981 Val uint32
2982 }
2983
2984
2985 type Chdr32 struct {
2986 Type uint32
2987 Size uint32
2988 Addralign uint32
2989 }
2990
2991
2994
2995
2996 type Rel32 struct {
2997 Off uint32
2998 Info uint32
2999 }
3000
3001
3002 type Rela32 struct {
3003 Off uint32
3004 Info uint32
3005 Addend int32
3006 }
3007
3008 func R_SYM32(info uint32) uint32 { return info >> 8 }
3009 func R_TYPE32(info uint32) uint32 { return info & 0xff }
3010 func R_INFO32(sym, typ uint32) uint32 { return sym<<8 | typ }
3011
3012
3013 type Sym32 struct {
3014 Name uint32
3015 Value uint32
3016 Size uint32
3017 Info uint8
3018 Other uint8
3019 Shndx uint16
3020 }
3021
3022 const Sym32Size = 16
3023
3024 func ST_BIND(info uint8) SymBind { return SymBind(info >> 4) }
3025 func ST_TYPE(info uint8) SymType { return SymType(info & 0xF) }
3026 func ST_INFO(bind SymBind, typ SymType) uint8 {
3027 return uint8(bind)<<4 | uint8(typ)&0xf
3028 }
3029 func ST_VISIBILITY(other uint8) SymVis { return SymVis(other & 3) }
3030
3031
3034
3035
3036 type Header64 struct {
3037 Ident [EI_NIDENT]byte
3038 Type uint16
3039 Machine uint16
3040 Version uint32
3041 Entry uint64
3042 Phoff uint64
3043 Shoff uint64
3044 Flags uint32
3045 Ehsize uint16
3046 Phentsize uint16
3047 Phnum uint16
3048 Shentsize uint16
3049 Shnum uint16
3050 Shstrndx uint16
3051 }
3052
3053
3054 type Section64 struct {
3055 Name uint32
3056 Type uint32
3057 Flags uint64
3058 Addr uint64
3059 Off uint64
3060 Size uint64
3061 Link uint32
3062 Info uint32
3063 Addralign uint64
3064 Entsize uint64
3065 }
3066
3067
3068 type Prog64 struct {
3069 Type uint32
3070 Flags uint32
3071 Off uint64
3072 Vaddr uint64
3073 Paddr uint64
3074 Filesz uint64
3075 Memsz uint64
3076 Align uint64
3077 }
3078
3079
3080 type Dyn64 struct {
3081 Tag int64
3082 Val uint64
3083 }
3084
3085
3086 type Chdr64 struct {
3087 Type uint32
3088 _ uint32
3089 Size uint64
3090 Addralign uint64
3091 }
3092
3093
3096
3097
3098 type Rel64 struct {
3099 Off uint64
3100 Info uint64
3101 }
3102
3103
3104 type Rela64 struct {
3105 Off uint64
3106 Info uint64
3107 Addend int64
3108 }
3109
3110 func R_SYM64(info uint64) uint32 { return uint32(info >> 32) }
3111 func R_TYPE64(info uint64) uint32 { return uint32(info) }
3112 func R_INFO(sym, typ uint32) uint64 { return uint64(sym)<<32 | uint64(typ) }
3113
3114
3115 type Sym64 struct {
3116 Name uint32
3117 Info uint8
3118 Other uint8
3119 Shndx uint16
3120 Value uint64
3121 Size uint64
3122 }
3123
3124 const Sym64Size = 24
3125
3126 type intName struct {
3127 i uint32
3128 s string
3129 }
3130
3131 func stringName(i uint32, names []intName, goSyntax bool) string {
3132 for _, n := range names {
3133 if n.i == i {
3134 if goSyntax {
3135 return "elf." + n.s
3136 }
3137 return n.s
3138 }
3139 }
3140
3141
3142
3143 for j := len(names) - 1; j >= 0; j-- {
3144 n := names[j]
3145 if n.i < i {
3146 s := n.s
3147 if goSyntax {
3148 s = "elf." + s
3149 }
3150 return s + "+" + strconv.FormatUint(uint64(i-n.i), 10)
3151 }
3152 }
3153
3154 return strconv.FormatUint(uint64(i), 10)
3155 }
3156
3157 func flagName(i uint32, names []intName, goSyntax bool) string {
3158 s := ""
3159 for _, n := range names {
3160 if n.i&i == n.i {
3161 if len(s) > 0 {
3162 s += "+"
3163 }
3164 if goSyntax {
3165 s += "elf."
3166 }
3167 s += n.s
3168 i -= n.i
3169 }
3170 }
3171 if len(s) == 0 {
3172 return "0x" + strconv.FormatUint(uint64(i), 16)
3173 }
3174 if i != 0 {
3175 s += "+0x" + strconv.FormatUint(uint64(i), 16)
3176 }
3177 return s
3178 }
3179
View as plain text