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