• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ELF_H
2 #define _ELF_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <stdint.h>
9 
10 typedef uint16_t Elf32_Half;
11 typedef uint16_t Elf64_Half;
12 
13 typedef uint32_t Elf32_Word;
14 typedef	int32_t  Elf32_Sword;
15 typedef uint32_t Elf64_Word;
16 typedef	int32_t  Elf64_Sword;
17 
18 typedef uint64_t Elf32_Xword;
19 typedef	int64_t  Elf32_Sxword;
20 typedef uint64_t Elf64_Xword;
21 typedef	int64_t  Elf64_Sxword;
22 
23 typedef uint32_t Elf32_Addr;
24 typedef uint64_t Elf64_Addr;
25 
26 typedef uint32_t Elf32_Off;
27 typedef uint64_t Elf64_Off;
28 
29 typedef uint16_t Elf32_Section;
30 typedef uint16_t Elf64_Section;
31 
32 typedef Elf32_Half Elf32_Versym;
33 typedef Elf64_Half Elf64_Versym;
34 
35 #define EI_NIDENT (16)
36 
37 typedef struct {
38   unsigned char	e_ident[EI_NIDENT];
39   Elf32_Half	e_type;
40   Elf32_Half	e_machine;
41   Elf32_Word	e_version;
42   Elf32_Addr	e_entry;
43   Elf32_Off	e_phoff;
44   Elf32_Off	e_shoff;
45   Elf32_Word	e_flags;
46   Elf32_Half	e_ehsize;
47   Elf32_Half	e_phentsize;
48   Elf32_Half	e_phnum;
49   Elf32_Half	e_shentsize;
50   Elf32_Half	e_shnum;
51   Elf32_Half	e_shstrndx;
52 } Elf32_Ehdr;
53 
54 typedef struct {
55   unsigned char	e_ident[EI_NIDENT];
56   Elf64_Half	e_type;
57   Elf64_Half	e_machine;
58   Elf64_Word	e_version;
59   Elf64_Addr	e_entry;
60   Elf64_Off	e_phoff;
61   Elf64_Off	e_shoff;
62   Elf64_Word	e_flags;
63   Elf64_Half	e_ehsize;
64   Elf64_Half	e_phentsize;
65   Elf64_Half	e_phnum;
66   Elf64_Half	e_shentsize;
67   Elf64_Half	e_shnum;
68   Elf64_Half	e_shstrndx;
69 } Elf64_Ehdr;
70 
71 #define EI_MAG0		0
72 #define ELFMAG0		0x7f
73 
74 #define EI_MAG1		1
75 #define ELFMAG1		'E'
76 
77 #define EI_MAG2		2
78 #define ELFMAG2		'L'
79 
80 #define EI_MAG3		3
81 #define ELFMAG3		'F'
82 
83 
84 #define	ELFMAG		"\177ELF"
85 #define	SELFMAG		4
86 
87 #define EI_CLASS	4
88 #define ELFCLASSNONE	0
89 #define ELFCLASS32	1
90 #define ELFCLASS64	2
91 #define ELFCLASSNUM	3
92 
93 #define EI_DATA		5
94 #define ELFDATANONE	0
95 #define ELFDATA2LSB	1
96 #define ELFDATA2MSB	2
97 #define ELFDATANUM	3
98 
99 #define EI_VERSION	6
100 
101 
102 #define EI_OSABI	7
103 #define ELFOSABI_NONE		0
104 #define ELFOSABI_SYSV		0
105 #define ELFOSABI_HPUX		1
106 #define ELFOSABI_NETBSD		2
107 #define ELFOSABI_LINUX		3
108 #define ELFOSABI_GNU		3
109 #define ELFOSABI_SOLARIS	6
110 #define ELFOSABI_AIX		7
111 #define ELFOSABI_IRIX		8
112 #define ELFOSABI_FREEBSD	9
113 #define ELFOSABI_TRU64		10
114 #define ELFOSABI_MODESTO	11
115 #define ELFOSABI_OPENBSD	12
116 #define ELFOSABI_ARM		97
117 #define ELFOSABI_STANDALONE	255
118 
119 #define EI_ABIVERSION	8
120 
121 #define EI_PAD		9
122 
123 
124 
125 #define ET_NONE		0
126 #define ET_REL		1
127 #define ET_EXEC		2
128 #define ET_DYN		3
129 #define ET_CORE		4
130 #define	ET_NUM		5
131 #define ET_LOOS		0xfe00
132 #define ET_HIOS		0xfeff
133 #define ET_LOPROC	0xff00
134 #define ET_HIPROC	0xffff
135 
136 
137 
138 #define EM_NONE		 0
139 #define EM_M32		 1
140 #define EM_SPARC	 2
141 #define EM_386		 3
142 #define EM_68K		 4
143 #define EM_88K		 5
144 #define EM_860		 7
145 #define EM_MIPS		 8
146 #define EM_S370		 9
147 #define EM_MIPS_RS3_LE	10
148 
149 #define EM_PARISC	15
150 #define EM_VPP500	17
151 #define EM_SPARC32PLUS	18
152 #define EM_960		19
153 #define EM_PPC		20
154 #define EM_PPC64	21
155 #define EM_S390		22
156 
157 #define EM_V800		36
158 #define EM_FR20		37
159 #define EM_RH32		38
160 #define EM_RCE		39
161 #define EM_ARM		40
162 #define EM_FAKE_ALPHA	41
163 #define EM_SH		42
164 #define EM_SPARCV9	43
165 #define EM_TRICORE	44
166 #define EM_ARC		45
167 #define EM_H8_300	46
168 #define EM_H8_300H	47
169 #define EM_H8S		48
170 #define EM_H8_500	49
171 #define EM_IA_64	50
172 #define EM_MIPS_X	51
173 #define EM_COLDFIRE	52
174 #define EM_68HC12	53
175 #define EM_MMA		54
176 #define EM_PCP		55
177 #define EM_NCPU		56
178 #define EM_NDR1		57
179 #define EM_STARCORE	58
180 #define EM_ME16		59
181 #define EM_ST100	60
182 #define EM_TINYJ	61
183 #define EM_X86_64	62
184 #define EM_PDSP		63
185 
186 #define EM_FX66		66
187 #define EM_ST9PLUS	67
188 #define EM_ST7		68
189 #define EM_68HC16	69
190 #define EM_68HC11	70
191 #define EM_68HC08	71
192 #define EM_68HC05	72
193 #define EM_SVX		73
194 #define EM_ST19		74
195 #define EM_VAX		75
196 #define EM_CRIS		76
197 #define EM_JAVELIN	77
198 #define EM_FIREPATH	78
199 #define EM_ZSP		79
200 #define EM_MMIX		80
201 #define EM_HUANY	81
202 #define EM_PRISM	82
203 #define EM_AVR		83
204 #define EM_FR30		84
205 #define EM_D10V		85
206 #define EM_D30V		86
207 #define EM_V850		87
208 #define EM_M32R		88
209 #define EM_MN10300	89
210 #define EM_MN10200	90
211 #define EM_PJ		91
212 #define EM_OR1K		92
213 #define EM_OPENRISC	92
214 #define EM_ARC_A5	93
215 #define EM_ARC_COMPACT	93
216 #define EM_XTENSA	94
217 #define EM_VIDEOCORE	95
218 #define EM_TMM_GPP	96
219 #define EM_NS32K	97
220 #define EM_TPC		98
221 #define EM_SNP1K	99
222 #define EM_ST200	100
223 #define EM_IP2K		101
224 #define EM_MAX		102
225 #define EM_CR		103
226 #define EM_F2MC16	104
227 #define EM_MSP430	105
228 #define EM_BLACKFIN	106
229 #define EM_SE_C33	107
230 #define EM_SEP		108
231 #define EM_ARCA		109
232 #define EM_UNICORE	110
233 #define EM_EXCESS	111
234 #define EM_DXP		112
235 #define EM_ALTERA_NIOS2 113
236 #define EM_CRX		114
237 #define EM_XGATE	115
238 #define EM_C166		116
239 #define EM_M16C		117
240 #define EM_DSPIC30F	118
241 #define EM_CE		119
242 #define EM_M32C		120
243 #define EM_TSK3000	131
244 #define EM_RS08		132
245 #define EM_SHARC	133
246 #define EM_ECOG2	134
247 #define EM_SCORE7	135
248 #define EM_DSP24	136
249 #define EM_VIDEOCORE3	137
250 #define EM_LATTICEMICO32 138
251 #define EM_SE_C17	139
252 #define EM_TI_C6000	140
253 #define EM_TI_C2000	141
254 #define EM_TI_C5500	142
255 #define EM_TI_ARP32	143
256 #define EM_TI_PRU	144
257 #define EM_MMDSP_PLUS	160
258 #define EM_CYPRESS_M8C	161
259 #define EM_R32C		162
260 #define EM_TRIMEDIA	163
261 #define EM_QDSP6	164
262 #define EM_8051		165
263 #define EM_STXP7X	166
264 #define EM_NDS32	167
265 #define EM_ECOG1X	168
266 #define EM_MAXQ30	169
267 #define EM_XIMO16	170
268 #define EM_MANIK	171
269 #define EM_CRAYNV2	172
270 #define EM_RX		173
271 #define EM_METAG	174
272 #define EM_MCST_ELBRUS	175
273 #define EM_ECOG16	176
274 #define EM_CR16		177
275 #define EM_ETPU		178
276 #define EM_SLE9X	179
277 #define EM_L10M		180
278 #define EM_K10M		181
279 #define EM_AARCH64	183
280 #define EM_AVR32	185
281 #define EM_STM8		186
282 #define EM_TILE64	187
283 #define EM_TILEPRO	188
284 #define EM_MICROBLAZE	189
285 #define EM_CUDA		190
286 #define EM_TILEGX	191
287 #define EM_CLOUDSHIELD	192
288 #define EM_COREA_1ST	193
289 #define EM_COREA_2ND	194
290 #define EM_ARC_COMPACT2	195
291 #define EM_OPEN8	196
292 #define EM_RL78		197
293 #define EM_VIDEOCORE5	198
294 #define EM_78KOR	199
295 #define EM_56800EX	200
296 #define EM_BA1		201
297 #define EM_BA2		202
298 #define EM_XCORE	203
299 #define EM_MCHP_PIC	204
300 #define EM_KM32		210
301 #define EM_KMX32	211
302 #define EM_EMX16	212
303 #define EM_EMX8		213
304 #define EM_KVARC	214
305 #define EM_CDP		215
306 #define EM_COGE		216
307 #define EM_COOL		217
308 #define EM_NORC		218
309 #define EM_CSR_KALIMBA	219
310 #define EM_Z80		220
311 #define EM_VISIUM	221
312 #define EM_FT32		222
313 #define EM_MOXIE	223
314 #define EM_AMDGPU	224
315 #define EM_RISCV	243
316 #define EM_BPF		247
317 #define EM_CSKY		252
318 #define EM_LOONGARCH	258
319 #define EM_NUM		259
320 
321 #define EM_ALPHA	0x9026
322 
323 #define EV_NONE		0
324 #define EV_CURRENT	1
325 #define EV_NUM		2
326 
327 typedef struct {
328   Elf32_Word	sh_name;
329   Elf32_Word	sh_type;
330   Elf32_Word	sh_flags;
331   Elf32_Addr	sh_addr;
332   Elf32_Off	sh_offset;
333   Elf32_Word	sh_size;
334   Elf32_Word	sh_link;
335   Elf32_Word	sh_info;
336   Elf32_Word	sh_addralign;
337   Elf32_Word	sh_entsize;
338 } Elf32_Shdr;
339 
340 typedef struct {
341   Elf64_Word	sh_name;
342   Elf64_Word	sh_type;
343   Elf64_Xword	sh_flags;
344   Elf64_Addr	sh_addr;
345   Elf64_Off	sh_offset;
346   Elf64_Xword	sh_size;
347   Elf64_Word	sh_link;
348   Elf64_Word	sh_info;
349   Elf64_Xword	sh_addralign;
350   Elf64_Xword	sh_entsize;
351 } Elf64_Shdr;
352 
353 
354 
355 #define SHN_UNDEF	0
356 #define SHN_LORESERVE	0xff00
357 #define SHN_LOPROC	0xff00
358 #define SHN_BEFORE	0xff00
359 
360 #define SHN_AFTER	0xff01
361 
362 #define SHN_HIPROC	0xff1f
363 #define SHN_LOOS	0xff20
364 #define SHN_HIOS	0xff3f
365 #define SHN_ABS		0xfff1
366 #define SHN_COMMON	0xfff2
367 #define SHN_XINDEX	0xffff
368 #define SHN_HIRESERVE	0xffff
369 
370 
371 
372 #define SHT_NULL	  0
373 #define SHT_PROGBITS	  1
374 #define SHT_SYMTAB	  2
375 #define SHT_STRTAB	  3
376 #define SHT_RELA	  4
377 #define SHT_HASH	  5
378 #define SHT_DYNAMIC	  6
379 #define SHT_NOTE	  7
380 #define SHT_NOBITS	  8
381 #define SHT_REL		  9
382 #define SHT_SHLIB	  10
383 #define SHT_DYNSYM	  11
384 #define SHT_INIT_ARRAY	  14
385 #define SHT_FINI_ARRAY	  15
386 #define SHT_PREINIT_ARRAY 16
387 #define SHT_GROUP	  17
388 #define SHT_SYMTAB_SHNDX  18
389 #ifndef __LITEOS__
390 #define	SHT_RELR		  19
391 #define	SHT_NUM		  20
392 #else
393 #define SHT_RELR	  19
394 #define	SHT_NUM		  20
395 #endif
396 #define SHT_LOOS	  0x60000000
397 #define SHT_GNU_ATTRIBUTES 0x6ffffff5
398 #define SHT_GNU_HASH	  0x6ffffff6
399 #define SHT_GNU_LIBLIST	  0x6ffffff7
400 #define SHT_CHECKSUM	  0x6ffffff8
401 #define SHT_LOSUNW	  0x6ffffffa
402 #define SHT_SUNW_move	  0x6ffffffa
403 #define SHT_SUNW_COMDAT   0x6ffffffb
404 #define SHT_SUNW_syminfo  0x6ffffffc
405 #define SHT_GNU_verdef	  0x6ffffffd
406 #define SHT_GNU_verneed	  0x6ffffffe
407 #define SHT_GNU_versym	  0x6fffffff
408 #define SHT_HISUNW	  0x6fffffff
409 #define SHT_HIOS	  0x6fffffff
410 #define SHT_LOPROC	  0x70000000
411 #define SHT_AARCH64_AUTH_RELR 0x70000004
412 #define SHT_HIPROC	  0x7fffffff
413 #define SHT_LOUSER	  0x80000000
414 #define SHT_HIUSER	  0x8fffffff
415 
416 #define SHF_WRITE	     (1 << 0)
417 #define SHF_ALLOC	     (1 << 1)
418 #define SHF_EXECINSTR	     (1 << 2)
419 #define SHF_MERGE	     (1 << 4)
420 #define SHF_STRINGS	     (1 << 5)
421 #define SHF_INFO_LINK	     (1 << 6)
422 #define SHF_LINK_ORDER	     (1 << 7)
423 #define SHF_OS_NONCONFORMING (1 << 8)
424 
425 #define SHF_GROUP	     (1 << 9)
426 #define SHF_TLS		     (1 << 10)
427 #define SHF_COMPRESSED	     (1 << 11)
428 #define SHF_MASKOS	     0x0ff00000
429 #define SHF_MASKPROC	     0xf0000000
430 #define SHF_ORDERED	     (1 << 30)
431 #define SHF_EXCLUDE	     (1U << 31)
432 
433 typedef struct {
434   Elf32_Word	ch_type;
435   Elf32_Word	ch_size;
436   Elf32_Word	ch_addralign;
437 } Elf32_Chdr;
438 
439 typedef struct {
440   Elf64_Word	ch_type;
441   Elf64_Word	ch_reserved;
442   Elf64_Xword	ch_size;
443   Elf64_Xword	ch_addralign;
444 } Elf64_Chdr;
445 
446 #define ELFCOMPRESS_ZLIB	1
447 #define ELFCOMPRESS_ZSTD	2
448 #define ELFCOMPRESS_LOOS	0x60000000
449 #define ELFCOMPRESS_HIOS	0x6fffffff
450 #define ELFCOMPRESS_LOPROC	0x70000000
451 #define ELFCOMPRESS_HIPROC	0x7fffffff
452 
453 
454 #define GRP_COMDAT	0x1
455 
456 typedef struct {
457   Elf32_Word	st_name;
458   Elf32_Addr	st_value;
459   Elf32_Word	st_size;
460   unsigned char	st_info;
461   unsigned char	st_other;
462   Elf32_Section	st_shndx;
463 } Elf32_Sym;
464 
465 typedef struct {
466   Elf64_Word	st_name;
467   unsigned char	st_info;
468   unsigned char st_other;
469   Elf64_Section	st_shndx;
470   Elf64_Addr	st_value;
471   Elf64_Xword	st_size;
472 } Elf64_Sym;
473 
474 typedef struct {
475   Elf32_Half si_boundto;
476   Elf32_Half si_flags;
477 } Elf32_Syminfo;
478 
479 typedef struct {
480   Elf64_Half si_boundto;
481   Elf64_Half si_flags;
482 } Elf64_Syminfo;
483 
484 #define SYMINFO_BT_SELF		0xffff
485 #define SYMINFO_BT_PARENT	0xfffe
486 #define SYMINFO_BT_LOWRESERVE	0xff00
487 
488 #define SYMINFO_FLG_DIRECT	0x0001
489 #define SYMINFO_FLG_PASSTHRU	0x0002
490 #define SYMINFO_FLG_COPY	0x0004
491 #define SYMINFO_FLG_LAZYLOAD	0x0008
492 
493 #define SYMINFO_NONE		0
494 #define SYMINFO_CURRENT		1
495 #define SYMINFO_NUM		2
496 
497 #define ELF32_ST_BIND(val)		(((unsigned char) (val)) >> 4)
498 #define ELF32_ST_TYPE(val)		((val) & 0xf)
499 #define ELF32_ST_INFO(bind, type)	(((bind) << 4) + ((type) & 0xf))
500 
501 #define ELF64_ST_BIND(val)		ELF32_ST_BIND (val)
502 #define ELF64_ST_TYPE(val)		ELF32_ST_TYPE (val)
503 #define ELF64_ST_INFO(bind, type)	ELF32_ST_INFO ((bind), (type))
504 
505 #define STB_LOCAL	0
506 #define STB_GLOBAL	1
507 #define STB_WEAK	2
508 #define	STB_NUM		3
509 #define STB_LOOS	10
510 #define STB_GNU_UNIQUE	10
511 #define STB_HIOS	12
512 #define STB_LOPROC	13
513 #define STB_HIPROC	15
514 
515 #define STT_NOTYPE	0
516 #define STT_OBJECT	1
517 #define STT_FUNC	2
518 #define STT_SECTION	3
519 #define STT_FILE	4
520 #define STT_COMMON	5
521 #define STT_TLS		6
522 #define	STT_NUM		7
523 #define STT_LOOS	10
524 #define STT_GNU_IFUNC	10
525 #define STT_HIOS	12
526 #define STT_LOPROC	13
527 #define STT_HIPROC	15
528 
529 #define STN_UNDEF	0
530 
531 #define ELF32_ST_VISIBILITY(o)	((o) & 0x03)
532 #define ELF64_ST_VISIBILITY(o)	ELF32_ST_VISIBILITY (o)
533 
534 #define STV_DEFAULT	0
535 #define STV_INTERNAL	1
536 #define STV_HIDDEN	2
537 #define STV_PROTECTED	3
538 
539 
540 
541 
542 typedef struct {
543   Elf32_Addr	r_offset;
544   Elf32_Word	r_info;
545 } Elf32_Rel;
546 
547 typedef struct {
548   Elf64_Addr	r_offset;
549   Elf64_Xword	r_info;
550 } Elf64_Rel;
551 
552 
553 
554 typedef struct {
555   Elf32_Addr	r_offset;
556   Elf32_Word	r_info;
557   Elf32_Sword	r_addend;
558 } Elf32_Rela;
559 
560 typedef struct {
561   Elf64_Addr	r_offset;
562   Elf64_Xword	r_info;
563   Elf64_Sxword	r_addend;
564 } Elf64_Rela;
565 
566 
567 
568 typedef Elf32_Word Elf32_Relr;
569 typedef Elf64_Xword Elf64_Relr;
570 
571 
572 
573 #define ELF32_R_SYM(val)		((val) >> 8)
574 #define ELF32_R_TYPE(val)		((val) & 0xff)
575 #define ELF32_R_INFO(sym, type)		(((sym) << 8) + ((type) & 0xff))
576 
577 #define ELF64_R_SYM(i)			((i) >> 32)
578 #define ELF64_R_TYPE(i)			((i) & 0xffffffff)
579 #define ELF64_R_INFO(sym,type)		((((Elf64_Xword) (sym)) << 32) + (type))
580 
581 
582 
583 typedef struct {
584   Elf32_Word	p_type;
585   Elf32_Off	p_offset;
586   Elf32_Addr	p_vaddr;
587   Elf32_Addr	p_paddr;
588   Elf32_Word	p_filesz;
589   Elf32_Word	p_memsz;
590   Elf32_Word	p_flags;
591   Elf32_Word	p_align;
592 } Elf32_Phdr;
593 
594 typedef struct {
595   Elf64_Word	p_type;
596   Elf64_Word	p_flags;
597   Elf64_Off	p_offset;
598   Elf64_Addr	p_vaddr;
599   Elf64_Addr	p_paddr;
600   Elf64_Xword	p_filesz;
601   Elf64_Xword	p_memsz;
602   Elf64_Xword	p_align;
603 } Elf64_Phdr;
604 
605 
606 
607 #define	PT_NULL		0
608 #define PT_LOAD		1
609 #define PT_DYNAMIC	2
610 #define PT_INTERP	3
611 #define PT_NOTE		4
612 #define PT_SHLIB	5
613 #define PT_PHDR		6
614 #define PT_TLS		7
615 #define	PT_NUM		8
616 #define PT_LOOS		0x60000000
617 #define PT_GNU_EH_FRAME	0x6474e550
618 #define PT_GNU_STACK	0x6474e551
619 #define PT_GNU_RELRO	0x6474e552
620 #define PT_GNU_PROPERTY	0x6474e553
621 #define PT_OHOS_CFI_MODIFIER 0x6833fc30
622 #define PT_LOSUNW	0x6ffffffa
623 #define PT_SUNWBSS	0x6ffffffa
624 #define PT_SUNWSTACK	0x6ffffffb
625 #define PT_HISUNW	0x6fffffff
626 #define PT_HIOS		0x6fffffff
627 #define PT_LOPROC	0x70000000
628 #define PT_HIPROC	0x7fffffff
629 
630 #ifndef __LITEOS__
631 #define PT_OHOS_RANDOMDATA	0x6788fc60
632 #endif
633 #define PN_XNUM 0xffff
634 
635 
636 #define PF_X		(1 << 0)
637 #define PF_W		(1 << 1)
638 #define PF_R		(1 << 2)
639 #define PF_MASKOS	0x0ff00000
640 #define PF_MASKPROC	0xf0000000
641 
642 
643 
644 #define NT_PRSTATUS	1
645 #define NT_PRFPREG	2
646 #define NT_FPREGSET	2
647 #define NT_PRPSINFO	3
648 #define NT_PRXREG	4
649 #define NT_TASKSTRUCT	4
650 #define NT_PLATFORM	5
651 #define NT_AUXV		6
652 #define NT_GWINDOWS	7
653 #define NT_ASRS		8
654 #define NT_PSTATUS	10
655 #define NT_PSINFO	13
656 #define NT_PRCRED	14
657 #define NT_UTSNAME	15
658 #define NT_LWPSTATUS	16
659 #define NT_LWPSINFO	17
660 #define NT_PRFPXREG	20
661 #define NT_SIGINFO	0x53494749
662 #define NT_FILE		0x46494c45
663 #define NT_PRXFPREG	0x46e62b7f
664 #define NT_PPC_VMX	0x100
665 #define NT_PPC_SPE	0x101
666 #define NT_PPC_VSX	0x102
667 #define NT_PPC_TAR	0x103
668 #define NT_PPC_PPR	0x104
669 #define NT_PPC_DSCR	0x105
670 #define NT_PPC_EBB	0x106
671 #define NT_PPC_PMU	0x107
672 #define NT_PPC_TM_CGPR	0x108
673 #define NT_PPC_TM_CFPR	0x109
674 #define NT_PPC_TM_CVMX	0x10a
675 #define NT_PPC_TM_CVSX	0x10b
676 #define NT_PPC_TM_SPR	0x10c
677 #define NT_PPC_TM_CTAR	0x10d
678 #define NT_PPC_TM_CPPR	0x10e
679 #define NT_PPC_TM_CDSCR	0x10f
680 #define NT_386_TLS	0x200
681 #define NT_386_IOPERM	0x201
682 #define NT_X86_XSTATE	0x202
683 #define NT_S390_HIGH_GPRS	0x300
684 #define NT_S390_TIMER	0x301
685 #define NT_S390_TODCMP	0x302
686 #define NT_S390_TODPREG	0x303
687 #define NT_S390_CTRS	0x304
688 #define NT_S390_PREFIX	0x305
689 #define NT_S390_LAST_BREAK	0x306
690 #define NT_S390_SYSTEM_CALL	0x307
691 #define NT_S390_TDB	0x308
692 #define NT_S390_VXRS_LOW	0x309
693 #define NT_S390_VXRS_HIGH	0x30a
694 #define NT_S390_GS_CB	0x30b
695 #define NT_S390_GS_BC	0x30c
696 #define NT_S390_RI_CB	0x30d
697 #define NT_ARM_VFP	0x400
698 #define NT_ARM_TLS	0x401
699 #define NT_ARM_HW_BREAK	0x402
700 #define NT_ARM_HW_WATCH	0x403
701 #define NT_ARM_SYSTEM_CALL	0x404
702 #define NT_ARM_SVE	0x405
703 #define NT_ARM_PAC_MASK	0x406
704 #define NT_ARM_PACA_KEYS	0x407
705 #define NT_ARM_PACG_KEYS	0x408
706 #define NT_ARM_TAGGED_ADDR_CTRL	0x409
707 #define NT_ARM_PAC_ENABLED_KEYS	0x40a
708 #define NT_METAG_CBUF	0x500
709 #define NT_METAG_RPIPE	0x501
710 #define NT_METAG_TLS	0x502
711 #define NT_ARC_V2	0x600
712 #define NT_VMCOREDD	0x700
713 #define NT_MIPS_DSP	0x800
714 #define NT_MIPS_FP_MODE	0x801
715 #define NT_MIPS_MSA	0x802
716 #define NT_RISCV_CSR	0x900
717 #define NT_RISCV_VECTOR	0x901
718 #define NT_VERSION	1
719 #define NT_LOONGARCH_CPUCFG	0xa00
720 #define NT_LOONGARCH_CSR	0xa01
721 #define NT_LOONGARCH_LSX	0xa02
722 #define NT_LOONGARCH_LASX	0xa03
723 #define NT_LOONGARCH_LBT	0xa04
724 
725 
726 
727 
728 typedef struct {
729   Elf32_Sword d_tag;
730   union {
731       Elf32_Word d_val;
732       Elf32_Addr d_ptr;
733   } d_un;
734 } Elf32_Dyn;
735 
736 typedef struct {
737   Elf64_Sxword d_tag;
738   union {
739       Elf64_Xword d_val;
740       Elf64_Addr d_ptr;
741   } d_un;
742 } Elf64_Dyn;
743 
744 
745 
746 #define DT_NULL		0
747 #define DT_NEEDED	1
748 #define DT_PLTRELSZ	2
749 #define DT_PLTGOT	3
750 #define DT_HASH		4
751 #define DT_STRTAB	5
752 #define DT_SYMTAB	6
753 #define DT_RELA		7
754 #define DT_RELASZ	8
755 #define DT_RELAENT	9
756 #define DT_STRSZ	10
757 #define DT_SYMENT	11
758 #define DT_INIT		12
759 #define DT_FINI		13
760 #define DT_SONAME	14
761 #define DT_RPATH	15
762 #define DT_SYMBOLIC	16
763 #define DT_REL		17
764 #define DT_RELSZ	18
765 #define DT_RELENT	19
766 #define DT_PLTREL	20
767 #define DT_DEBUG	21
768 #define DT_TEXTREL	22
769 #define DT_JMPREL	23
770 #define	DT_BIND_NOW	24
771 #define	DT_INIT_ARRAY	25
772 #define	DT_FINI_ARRAY	26
773 #define	DT_INIT_ARRAYSZ	27
774 #define	DT_FINI_ARRAYSZ	28
775 #define DT_RUNPATH	29
776 #define DT_FLAGS	30
777 #define DT_ENCODING	32
778 #define DT_PREINIT_ARRAY 32
779 #define DT_PREINIT_ARRAYSZ 33
780 #define DT_SYMTAB_SHNDX	34
781 #ifndef __LITEOS__
782 #define DT_RELRSZ	35
783 #define DT_RELR		36
784 #define DT_RELRENT	37
785 #define	DT_NUM		38
786 #else
787 #define DT_RELRSZ	35
788 #define DT_RELR		36
789 #define DT_RELRENT	37
790 #define	DT_NUM		38
791 #endif
792 #define DT_LOOS		0x6000000d
793 #define DT_HIOS		0x6ffff000
794 #define DT_LOPROC	0x70000000
795 #define DT_HIPROC	0x7fffffff
796 #define	DT_PROCNUM	DT_MIPS_NUM
797 
798 #define DT_VALRNGLO	0x6ffffd00
799 #define DT_GNU_PRELINKED 0x6ffffdf5
800 #define DT_GNU_CONFLICTSZ 0x6ffffdf6
801 #define DT_GNU_LIBLISTSZ 0x6ffffdf7
802 #define DT_CHECKSUM	0x6ffffdf8
803 #define DT_PLTPADSZ	0x6ffffdf9
804 #define DT_MOVEENT	0x6ffffdfa
805 #define DT_MOVESZ	0x6ffffdfb
806 #define DT_FEATURE_1	0x6ffffdfc
807 #define DT_POSFLAG_1	0x6ffffdfd
808 
809 #define DT_SYMINSZ	0x6ffffdfe
810 #define DT_SYMINENT	0x6ffffdff
811 #define DT_VALRNGHI	0x6ffffdff
812 #define DT_VALTAGIDX(tag)	(DT_VALRNGHI - (tag))
813 #define DT_VALNUM 12
814 
815 #define DT_ADDRRNGLO	0x6ffffe00
816 #define DT_GNU_HASH	0x6ffffef5
817 #define DT_TLSDESC_PLT	0x6ffffef6
818 #define DT_TLSDESC_GOT	0x6ffffef7
819 #define DT_GNU_CONFLICT	0x6ffffef8
820 #define DT_GNU_LIBLIST	0x6ffffef9
821 #define DT_CONFIG	0x6ffffefa
822 #define DT_DEPAUDIT	0x6ffffefb
823 #define DT_AUDIT	0x6ffffefc
824 #define	DT_PLTPAD	0x6ffffefd
825 #define	DT_MOVETAB	0x6ffffefe
826 #define DT_SYMINFO	0x6ffffeff
827 #define DT_ADDRRNGHI	0x6ffffeff
828 #define DT_ADDRTAGIDX(tag)	(DT_ADDRRNGHI - (tag))
829 #define DT_ADDRNUM 11
830 
831 
832 
833 #define DT_VERSYM	0x6ffffff0
834 
835 #define DT_RELACOUNT	0x6ffffff9
836 #define DT_RELCOUNT	0x6ffffffa
837 
838 
839 #define DT_FLAGS_1	0x6ffffffb
840 #define	DT_VERDEF	0x6ffffffc
841 
842 #define	DT_VERDEFNUM	0x6ffffffd
843 #define	DT_VERNEED	0x6ffffffe
844 
845 #define	DT_VERNEEDNUM	0x6fffffff
846 #define DT_VERSIONTAGIDX(tag)	(DT_VERNEEDNUM - (tag))
847 #define DT_VERSIONTAGNUM 16
848 
849 
850 
851 #define DT_AUXILIARY    0x7ffffffd
852 #define DT_FILTER       0x7fffffff
853 #define DT_EXTRATAGIDX(tag)	((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
854 #define DT_EXTRANUM	3
855 
856 
857 #define DF_ORIGIN	0x00000001
858 #define DF_SYMBOLIC	0x00000002
859 #define DF_TEXTREL	0x00000004
860 #define DF_BIND_NOW	0x00000008
861 #define DF_STATIC_TLS	0x00000010
862 
863 
864 
865 #define DF_1_NOW	0x00000001
866 #define DF_1_GLOBAL	0x00000002
867 #define DF_1_GROUP	0x00000004
868 #define DF_1_NODELETE	0x00000008
869 #define DF_1_LOADFLTR	0x00000010
870 #define DF_1_INITFIRST	0x00000020
871 #define DF_1_NOOPEN	0x00000040
872 #define DF_1_ORIGIN	0x00000080
873 #define DF_1_DIRECT	0x00000100
874 #define DF_1_TRANS	0x00000200
875 #define DF_1_INTERPOSE	0x00000400
876 #define DF_1_NODEFLIB	0x00000800
877 #define DF_1_NODUMP	0x00001000
878 #define DF_1_CONFALT	0x00002000
879 #define DF_1_ENDFILTEE	0x00004000
880 #define	DF_1_DISPRELDNE	0x00008000
881 #define	DF_1_DISPRELPND	0x00010000
882 #define	DF_1_NODIRECT	0x00020000
883 #define	DF_1_IGNMULDEF	0x00040000
884 #define	DF_1_NOKSYMS	0x00080000
885 #define	DF_1_NOHDR	0x00100000
886 #define	DF_1_EDITED	0x00200000
887 #define	DF_1_NORELOC	0x00400000
888 #define	DF_1_SYMINTPOSE	0x00800000
889 #define	DF_1_GLOBAUDIT	0x01000000
890 #define	DF_1_SINGLETON	0x02000000
891 #define	DF_1_STUB	0x04000000
892 #define	DF_1_PIE	0x08000000
893 
894 #define DTF_1_PARINIT	0x00000001
895 #define DTF_1_CONFEXP	0x00000002
896 
897 
898 #define DF_P1_LAZYLOAD	0x00000001
899 #define DF_P1_GROUPPERM	0x00000002
900 
901 
902 
903 
904 typedef struct {
905   Elf32_Half	vd_version;
906   Elf32_Half	vd_flags;
907   Elf32_Half	vd_ndx;
908   Elf32_Half	vd_cnt;
909   Elf32_Word	vd_hash;
910   Elf32_Word	vd_aux;
911   Elf32_Word	vd_next;
912 } Elf32_Verdef;
913 
914 typedef struct {
915   Elf64_Half	vd_version;
916   Elf64_Half	vd_flags;
917   Elf64_Half	vd_ndx;
918   Elf64_Half	vd_cnt;
919   Elf64_Word	vd_hash;
920   Elf64_Word	vd_aux;
921   Elf64_Word	vd_next;
922 } Elf64_Verdef;
923 
924 
925 
926 #define VER_DEF_NONE	0
927 #define VER_DEF_CURRENT	1
928 #define VER_DEF_NUM	2
929 
930 
931 #define VER_FLG_BASE	0x1
932 #define VER_FLG_WEAK	0x2
933 
934 
935 #define	VER_NDX_LOCAL		0
936 #define	VER_NDX_GLOBAL		1
937 #define	VER_NDX_LORESERVE	0xff00
938 #define	VER_NDX_ELIMINATE	0xff01
939 
940 
941 
942 typedef struct {
943   Elf32_Word	vda_name;
944   Elf32_Word	vda_next;
945 } Elf32_Verdaux;
946 
947 typedef struct {
948   Elf64_Word	vda_name;
949   Elf64_Word	vda_next;
950 } Elf64_Verdaux;
951 
952 
953 
954 
955 typedef struct {
956   Elf32_Half	vn_version;
957   Elf32_Half	vn_cnt;
958   Elf32_Word	vn_file;
959   Elf32_Word	vn_aux;
960   Elf32_Word	vn_next;
961 } Elf32_Verneed;
962 
963 typedef struct {
964   Elf64_Half	vn_version;
965   Elf64_Half	vn_cnt;
966   Elf64_Word	vn_file;
967   Elf64_Word	vn_aux;
968   Elf64_Word	vn_next;
969 } Elf64_Verneed;
970 
971 
972 
973 #define VER_NEED_NONE	 0
974 #define VER_NEED_CURRENT 1
975 #define VER_NEED_NUM	 2
976 
977 
978 
979 typedef struct {
980   Elf32_Word	vna_hash;
981   Elf32_Half	vna_flags;
982   Elf32_Half	vna_other;
983   Elf32_Word	vna_name;
984   Elf32_Word	vna_next;
985 } Elf32_Vernaux;
986 
987 typedef struct {
988   Elf64_Word	vna_hash;
989   Elf64_Half	vna_flags;
990   Elf64_Half	vna_other;
991   Elf64_Word	vna_name;
992   Elf64_Word	vna_next;
993 } Elf64_Vernaux;
994 
995 
996 
997 #define VER_FLG_WEAK	0x2
998 
999 
1000 
1001 typedef struct {
1002   uint32_t a_type;
1003   union {
1004       uint32_t a_val;
1005   } a_un;
1006 } Elf32_auxv_t;
1007 
1008 typedef struct {
1009   uint64_t a_type;
1010   union {
1011       uint64_t a_val;
1012   } a_un;
1013 } Elf64_auxv_t;
1014 
1015 
1016 
1017 #define AT_NULL		0
1018 #define AT_IGNORE	1
1019 #define AT_EXECFD	2
1020 #define AT_PHDR		3
1021 #define AT_PHENT	4
1022 #define AT_PHNUM	5
1023 #define AT_PAGESZ	6
1024 #define AT_BASE		7
1025 #define AT_FLAGS	8
1026 #define AT_ENTRY	9
1027 #define AT_NOTELF	10
1028 #define AT_UID		11
1029 #define AT_EUID		12
1030 #define AT_GID		13
1031 #define AT_EGID		14
1032 #define AT_CLKTCK	17
1033 
1034 
1035 #define AT_PLATFORM	15
1036 #define AT_HWCAP	16
1037 
1038 
1039 
1040 
1041 #define AT_FPUCW	18
1042 
1043 
1044 #define AT_DCACHEBSIZE	19
1045 #define AT_ICACHEBSIZE	20
1046 #define AT_UCACHEBSIZE	21
1047 
1048 
1049 
1050 #define AT_IGNOREPPC	22
1051 
1052 #define	AT_SECURE	23
1053 
1054 #define AT_BASE_PLATFORM 24
1055 
1056 #define AT_RANDOM	25
1057 
1058 #define AT_HWCAP2	26
1059 
1060 #define AT_EXECFN	31
1061 
1062 
1063 
1064 #define AT_SYSINFO	32
1065 #define AT_SYSINFO_EHDR	33
1066 
1067 
1068 
1069 #define AT_L1I_CACHESHAPE	34
1070 #define AT_L1D_CACHESHAPE	35
1071 #define AT_L2_CACHESHAPE	36
1072 #define AT_L3_CACHESHAPE	37
1073 
1074 #define AT_L1I_CACHESIZE	40
1075 #define AT_L1I_CACHEGEOMETRY	41
1076 #define AT_L1D_CACHESIZE	42
1077 #define AT_L1D_CACHEGEOMETRY	43
1078 #define AT_L2_CACHESIZE		44
1079 #define AT_L2_CACHEGEOMETRY	45
1080 #define AT_L3_CACHESIZE		46
1081 #define AT_L3_CACHEGEOMETRY	47
1082 
1083 #define AT_MINSIGSTKSZ		51
1084 
1085 
1086 typedef struct {
1087   Elf32_Word n_namesz;
1088   Elf32_Word n_descsz;
1089   Elf32_Word n_type;
1090 } Elf32_Nhdr;
1091 
1092 typedef struct {
1093   Elf64_Word n_namesz;
1094   Elf64_Word n_descsz;
1095   Elf64_Word n_type;
1096 } Elf64_Nhdr;
1097 
1098 
1099 
1100 
1101 #define ELF_NOTE_SOLARIS	"SUNW Solaris"
1102 
1103 
1104 #define ELF_NOTE_GNU		"GNU"
1105 
1106 
1107 
1108 
1109 
1110 #define ELF_NOTE_PAGESIZE_HINT	1
1111 
1112 
1113 #define NT_GNU_ABI_TAG	1
1114 #define ELF_NOTE_ABI	NT_GNU_ABI_TAG
1115 
1116 
1117 
1118 #define ELF_NOTE_OS_LINUX	0
1119 #define ELF_NOTE_OS_GNU		1
1120 #define ELF_NOTE_OS_SOLARIS2	2
1121 #define ELF_NOTE_OS_FREEBSD	3
1122 
1123 #define NT_GNU_BUILD_ID	3
1124 #define NT_GNU_GOLD_VERSION	4
1125 #define NT_GNU_PROPERTY_TYPE_0	5
1126 
1127 
1128 
1129 typedef struct {
1130   Elf32_Xword m_value;
1131   Elf32_Word m_info;
1132   Elf32_Word m_poffset;
1133   Elf32_Half m_repeat;
1134   Elf32_Half m_stride;
1135 } Elf32_Move;
1136 
1137 typedef struct {
1138   Elf64_Xword m_value;
1139   Elf64_Xword m_info;
1140   Elf64_Xword m_poffset;
1141   Elf64_Half m_repeat;
1142   Elf64_Half m_stride;
1143 } Elf64_Move;
1144 
1145 
1146 #define ELF32_M_SYM(info)	((info) >> 8)
1147 #define ELF32_M_SIZE(info)	((unsigned char) (info))
1148 #define ELF32_M_INFO(sym, size)	(((sym) << 8) + (unsigned char) (size))
1149 
1150 #define ELF64_M_SYM(info)	ELF32_M_SYM (info)
1151 #define ELF64_M_SIZE(info)	ELF32_M_SIZE (info)
1152 #define ELF64_M_INFO(sym, size)	ELF32_M_INFO (sym, size)
1153 
1154 #define EF_CPU32	0x00810000
1155 
1156 #define R_68K_NONE	0
1157 #define R_68K_32	1
1158 #define R_68K_16	2
1159 #define R_68K_8		3
1160 #define R_68K_PC32	4
1161 #define R_68K_PC16	5
1162 #define R_68K_PC8	6
1163 #define R_68K_GOT32	7
1164 #define R_68K_GOT16	8
1165 #define R_68K_GOT8	9
1166 #define R_68K_GOT32O	10
1167 #define R_68K_GOT16O	11
1168 #define R_68K_GOT8O	12
1169 #define R_68K_PLT32	13
1170 #define R_68K_PLT16	14
1171 #define R_68K_PLT8	15
1172 #define R_68K_PLT32O	16
1173 #define R_68K_PLT16O	17
1174 #define R_68K_PLT8O	18
1175 #define R_68K_COPY	19
1176 #define R_68K_GLOB_DAT	20
1177 #define R_68K_JMP_SLOT	21
1178 #define R_68K_RELATIVE	22
1179 #define R_68K_TLS_GD32	25
1180 #define R_68K_TLS_GD16	26
1181 #define R_68K_TLS_GD8	27
1182 #define R_68K_TLS_LDM32	28
1183 #define R_68K_TLS_LDM16	29
1184 #define R_68K_TLS_LDM8	30
1185 #define R_68K_TLS_LDO32	31
1186 #define R_68K_TLS_LDO16	32
1187 #define R_68K_TLS_LDO8	33
1188 #define R_68K_TLS_IE32	34
1189 #define R_68K_TLS_IE16	35
1190 #define R_68K_TLS_IE8	36
1191 #define R_68K_TLS_LE32	37
1192 #define R_68K_TLS_LE16	38
1193 #define R_68K_TLS_LE8	39
1194 #define R_68K_TLS_DTPMOD32	40
1195 #define R_68K_TLS_DTPREL32	41
1196 #define R_68K_TLS_TPREL32	42
1197 #define R_68K_NUM	43
1198 
1199 #define R_386_NONE	   0
1200 #define R_386_32	   1
1201 #define R_386_PC32	   2
1202 #define R_386_GOT32	   3
1203 #define R_386_PLT32	   4
1204 #define R_386_COPY	   5
1205 #define R_386_GLOB_DAT	   6
1206 #define R_386_JMP_SLOT	   7
1207 #define R_386_RELATIVE	   8
1208 #define R_386_GOTOFF	   9
1209 #define R_386_GOTPC	   10
1210 #define R_386_32PLT	   11
1211 #define R_386_TLS_TPOFF	   14
1212 #define R_386_TLS_IE	   15
1213 #define R_386_TLS_GOTIE	   16
1214 #define R_386_TLS_LE	   17
1215 #define R_386_TLS_GD	   18
1216 #define R_386_TLS_LDM	   19
1217 #define R_386_16	   20
1218 #define R_386_PC16	   21
1219 #define R_386_8		   22
1220 #define R_386_PC8	   23
1221 #define R_386_TLS_GD_32	   24
1222 #define R_386_TLS_GD_PUSH  25
1223 #define R_386_TLS_GD_CALL  26
1224 #define R_386_TLS_GD_POP   27
1225 #define R_386_TLS_LDM_32   28
1226 #define R_386_TLS_LDM_PUSH 29
1227 #define R_386_TLS_LDM_CALL 30
1228 #define R_386_TLS_LDM_POP  31
1229 #define R_386_TLS_LDO_32   32
1230 #define R_386_TLS_IE_32	   33
1231 #define R_386_TLS_LE_32	   34
1232 #define R_386_TLS_DTPMOD32 35
1233 #define R_386_TLS_DTPOFF32 36
1234 #define R_386_TLS_TPOFF32  37
1235 #define R_386_SIZE32       38
1236 #define R_386_TLS_GOTDESC  39
1237 #define R_386_TLS_DESC_CALL 40
1238 #define R_386_TLS_DESC     41
1239 #define R_386_IRELATIVE	   42
1240 #define R_386_GOT32X	   43
1241 #define R_386_NUM	   44
1242 
1243 
1244 
1245 
1246 
1247 #define STT_SPARC_REGISTER	13
1248 
1249 
1250 
1251 #define EF_SPARCV9_MM		3
1252 #define EF_SPARCV9_TSO		0
1253 #define EF_SPARCV9_PSO		1
1254 #define EF_SPARCV9_RMO		2
1255 #define EF_SPARC_LEDATA		0x800000
1256 #define EF_SPARC_EXT_MASK	0xFFFF00
1257 #define EF_SPARC_32PLUS		0x000100
1258 #define EF_SPARC_SUN_US1	0x000200
1259 #define EF_SPARC_HAL_R1		0x000400
1260 #define EF_SPARC_SUN_US3	0x000800
1261 
1262 
1263 
1264 #define R_SPARC_NONE		0
1265 #define R_SPARC_8		1
1266 #define R_SPARC_16		2
1267 #define R_SPARC_32		3
1268 #define R_SPARC_DISP8		4
1269 #define R_SPARC_DISP16		5
1270 #define R_SPARC_DISP32		6
1271 #define R_SPARC_WDISP30		7
1272 #define R_SPARC_WDISP22		8
1273 #define R_SPARC_HI22		9
1274 #define R_SPARC_22		10
1275 #define R_SPARC_13		11
1276 #define R_SPARC_LO10		12
1277 #define R_SPARC_GOT10		13
1278 #define R_SPARC_GOT13		14
1279 #define R_SPARC_GOT22		15
1280 #define R_SPARC_PC10		16
1281 #define R_SPARC_PC22		17
1282 #define R_SPARC_WPLT30		18
1283 #define R_SPARC_COPY		19
1284 #define R_SPARC_GLOB_DAT	20
1285 #define R_SPARC_JMP_SLOT	21
1286 #define R_SPARC_RELATIVE	22
1287 #define R_SPARC_UA32		23
1288 
1289 
1290 
1291 #define R_SPARC_PLT32		24
1292 #define R_SPARC_HIPLT22		25
1293 #define R_SPARC_LOPLT10		26
1294 #define R_SPARC_PCPLT32		27
1295 #define R_SPARC_PCPLT22		28
1296 #define R_SPARC_PCPLT10		29
1297 #define R_SPARC_10		30
1298 #define R_SPARC_11		31
1299 #define R_SPARC_64		32
1300 #define R_SPARC_OLO10		33
1301 #define R_SPARC_HH22		34
1302 #define R_SPARC_HM10		35
1303 #define R_SPARC_LM22		36
1304 #define R_SPARC_PC_HH22		37
1305 #define R_SPARC_PC_HM10		38
1306 #define R_SPARC_PC_LM22		39
1307 #define R_SPARC_WDISP16		40
1308 #define R_SPARC_WDISP19		41
1309 #define R_SPARC_GLOB_JMP	42
1310 #define R_SPARC_7		43
1311 #define R_SPARC_5		44
1312 #define R_SPARC_6		45
1313 #define R_SPARC_DISP64		46
1314 #define R_SPARC_PLT64		47
1315 #define R_SPARC_HIX22		48
1316 #define R_SPARC_LOX10		49
1317 #define R_SPARC_H44		50
1318 #define R_SPARC_M44		51
1319 #define R_SPARC_L44		52
1320 #define R_SPARC_REGISTER	53
1321 #define R_SPARC_UA64		54
1322 #define R_SPARC_UA16		55
1323 #define R_SPARC_TLS_GD_HI22	56
1324 #define R_SPARC_TLS_GD_LO10	57
1325 #define R_SPARC_TLS_GD_ADD	58
1326 #define R_SPARC_TLS_GD_CALL	59
1327 #define R_SPARC_TLS_LDM_HI22	60
1328 #define R_SPARC_TLS_LDM_LO10	61
1329 #define R_SPARC_TLS_LDM_ADD	62
1330 #define R_SPARC_TLS_LDM_CALL	63
1331 #define R_SPARC_TLS_LDO_HIX22	64
1332 #define R_SPARC_TLS_LDO_LOX10	65
1333 #define R_SPARC_TLS_LDO_ADD	66
1334 #define R_SPARC_TLS_IE_HI22	67
1335 #define R_SPARC_TLS_IE_LO10	68
1336 #define R_SPARC_TLS_IE_LD	69
1337 #define R_SPARC_TLS_IE_LDX	70
1338 #define R_SPARC_TLS_IE_ADD	71
1339 #define R_SPARC_TLS_LE_HIX22	72
1340 #define R_SPARC_TLS_LE_LOX10	73
1341 #define R_SPARC_TLS_DTPMOD32	74
1342 #define R_SPARC_TLS_DTPMOD64	75
1343 #define R_SPARC_TLS_DTPOFF32	76
1344 #define R_SPARC_TLS_DTPOFF64	77
1345 #define R_SPARC_TLS_TPOFF32	78
1346 #define R_SPARC_TLS_TPOFF64	79
1347 #define R_SPARC_GOTDATA_HIX22	80
1348 #define R_SPARC_GOTDATA_LOX10	81
1349 #define R_SPARC_GOTDATA_OP_HIX22	82
1350 #define R_SPARC_GOTDATA_OP_LOX10	83
1351 #define R_SPARC_GOTDATA_OP	84
1352 #define R_SPARC_H34		85
1353 #define R_SPARC_SIZE32		86
1354 #define R_SPARC_SIZE64		87
1355 #define R_SPARC_GNU_VTINHERIT	250
1356 #define R_SPARC_GNU_VTENTRY	251
1357 #define R_SPARC_REV32		252
1358 
1359 #define R_SPARC_NUM		253
1360 
1361 
1362 
1363 #define DT_SPARC_REGISTER 0x70000001
1364 #define DT_SPARC_NUM	2
1365 
1366 
1367 #define EF_MIPS_NOREORDER   1
1368 #define EF_MIPS_PIC	    2
1369 #define EF_MIPS_CPIC	    4
1370 #define EF_MIPS_XGOT	    8
1371 #define EF_MIPS_64BIT_WHIRL 16
1372 #define EF_MIPS_ABI2	    32
1373 #define EF_MIPS_ABI_ON32    64
1374 #define EF_MIPS_FP64	    512
1375 #define EF_MIPS_NAN2008     1024
1376 #define EF_MIPS_ARCH	    0xf0000000
1377 
1378 
1379 
1380 #define EF_MIPS_ARCH_1	    0x00000000
1381 #define EF_MIPS_ARCH_2	    0x10000000
1382 #define EF_MIPS_ARCH_3	    0x20000000
1383 #define EF_MIPS_ARCH_4	    0x30000000
1384 #define EF_MIPS_ARCH_5	    0x40000000
1385 #define EF_MIPS_ARCH_32     0x50000000
1386 #define EF_MIPS_ARCH_64     0x60000000
1387 #define EF_MIPS_ARCH_32R2   0x70000000
1388 #define EF_MIPS_ARCH_64R2   0x80000000
1389 
1390 
1391 #define E_MIPS_ARCH_1	  0x00000000
1392 #define E_MIPS_ARCH_2	  0x10000000
1393 #define E_MIPS_ARCH_3	  0x20000000
1394 #define E_MIPS_ARCH_4	  0x30000000
1395 #define E_MIPS_ARCH_5	  0x40000000
1396 #define E_MIPS_ARCH_32	  0x50000000
1397 #define E_MIPS_ARCH_64	  0x60000000
1398 
1399 
1400 
1401 #define SHN_MIPS_ACOMMON    0xff00
1402 #define SHN_MIPS_TEXT	    0xff01
1403 #define SHN_MIPS_DATA	    0xff02
1404 #define SHN_MIPS_SCOMMON    0xff03
1405 #define SHN_MIPS_SUNDEFINED 0xff04
1406 
1407 
1408 
1409 #define SHT_MIPS_LIBLIST       0x70000000
1410 #define SHT_MIPS_MSYM	       0x70000001
1411 #define SHT_MIPS_CONFLICT      0x70000002
1412 #define SHT_MIPS_GPTAB	       0x70000003
1413 #define SHT_MIPS_UCODE	       0x70000004
1414 #define SHT_MIPS_DEBUG	       0x70000005
1415 #define SHT_MIPS_REGINFO       0x70000006
1416 #define SHT_MIPS_PACKAGE       0x70000007
1417 #define SHT_MIPS_PACKSYM       0x70000008
1418 #define SHT_MIPS_RELD	       0x70000009
1419 #define SHT_MIPS_IFACE         0x7000000b
1420 #define SHT_MIPS_CONTENT       0x7000000c
1421 #define SHT_MIPS_OPTIONS       0x7000000d
1422 #define SHT_MIPS_SHDR	       0x70000010
1423 #define SHT_MIPS_FDESC	       0x70000011
1424 #define SHT_MIPS_EXTSYM	       0x70000012
1425 #define SHT_MIPS_DENSE	       0x70000013
1426 #define SHT_MIPS_PDESC	       0x70000014
1427 #define SHT_MIPS_LOCSYM	       0x70000015
1428 #define SHT_MIPS_AUXSYM	       0x70000016
1429 #define SHT_MIPS_OPTSYM	       0x70000017
1430 #define SHT_MIPS_LOCSTR	       0x70000018
1431 #define SHT_MIPS_LINE	       0x70000019
1432 #define SHT_MIPS_RFDESC	       0x7000001a
1433 #define SHT_MIPS_DELTASYM      0x7000001b
1434 #define SHT_MIPS_DELTAINST     0x7000001c
1435 #define SHT_MIPS_DELTACLASS    0x7000001d
1436 #define SHT_MIPS_DWARF         0x7000001e
1437 #define SHT_MIPS_DELTADECL     0x7000001f
1438 #define SHT_MIPS_SYMBOL_LIB    0x70000020
1439 #define SHT_MIPS_EVENTS	       0x70000021
1440 #define SHT_MIPS_TRANSLATE     0x70000022
1441 #define SHT_MIPS_PIXIE	       0x70000023
1442 #define SHT_MIPS_XLATE	       0x70000024
1443 #define SHT_MIPS_XLATE_DEBUG   0x70000025
1444 #define SHT_MIPS_WHIRL	       0x70000026
1445 #define SHT_MIPS_EH_REGION     0x70000027
1446 #define SHT_MIPS_XLATE_OLD     0x70000028
1447 #define SHT_MIPS_PDR_EXCEPTION 0x70000029
1448 
1449 
1450 
1451 #define SHF_MIPS_GPREL	 0x10000000
1452 #define SHF_MIPS_MERGE	 0x20000000
1453 #define SHF_MIPS_ADDR	 0x40000000
1454 #define SHF_MIPS_STRINGS 0x80000000
1455 #define SHF_MIPS_NOSTRIP 0x08000000
1456 #define SHF_MIPS_LOCAL	 0x04000000
1457 #define SHF_MIPS_NAMES	 0x02000000
1458 #define SHF_MIPS_NODUPE	 0x01000000
1459 
1460 
1461 
1462 
1463 
1464 #define STO_MIPS_DEFAULT		0x0
1465 #define STO_MIPS_INTERNAL		0x1
1466 #define STO_MIPS_HIDDEN			0x2
1467 #define STO_MIPS_PROTECTED		0x3
1468 #define STO_MIPS_PLT			0x8
1469 #define STO_MIPS_SC_ALIGN_UNUSED	0xff
1470 
1471 
1472 #define STB_MIPS_SPLIT_COMMON		13
1473 
1474 
1475 
1476 typedef union {
1477   struct {
1478       Elf32_Word gt_current_g_value;
1479       Elf32_Word gt_unused;
1480   } gt_header;
1481   struct {
1482       Elf32_Word gt_g_value;
1483       Elf32_Word gt_bytes;
1484   } gt_entry;
1485 } Elf32_gptab;
1486 
1487 
1488 
1489 typedef struct {
1490   Elf32_Word	ri_gprmask;
1491   Elf32_Word	ri_cprmask[4];
1492   Elf32_Sword	ri_gp_value;
1493 } Elf32_RegInfo;
1494 
1495 
1496 
1497 typedef struct {
1498   unsigned char kind;
1499 
1500   unsigned char size;
1501   Elf32_Section section;
1502 
1503   Elf32_Word info;
1504 } Elf_Options;
1505 
1506 
1507 
1508 #define ODK_NULL	0
1509 #define ODK_REGINFO	1
1510 #define ODK_EXCEPTIONS	2
1511 #define ODK_PAD		3
1512 #define ODK_HWPATCH	4
1513 #define ODK_FILL	5
1514 #define ODK_TAGS	6
1515 #define ODK_HWAND	7
1516 #define ODK_HWOR	8
1517 
1518 
1519 
1520 #define OEX_FPU_MIN	0x1f
1521 #define OEX_FPU_MAX	0x1f00
1522 #define OEX_PAGE0	0x10000
1523 #define OEX_SMM		0x20000
1524 #define OEX_FPDBUG	0x40000
1525 #define OEX_PRECISEFP	OEX_FPDBUG
1526 #define OEX_DISMISS	0x80000
1527 
1528 #define OEX_FPU_INVAL	0x10
1529 #define OEX_FPU_DIV0	0x08
1530 #define OEX_FPU_OFLO	0x04
1531 #define OEX_FPU_UFLO	0x02
1532 #define OEX_FPU_INEX	0x01
1533 
1534 
1535 
1536 #define OHW_R4KEOP	0x1
1537 #define OHW_R8KPFETCH	0x2
1538 #define OHW_R5KEOP	0x4
1539 #define OHW_R5KCVTL	0x8
1540 
1541 #define OPAD_PREFIX	0x1
1542 #define OPAD_POSTFIX	0x2
1543 #define OPAD_SYMBOL	0x4
1544 
1545 
1546 
1547 typedef struct {
1548   Elf32_Word hwp_flags1;
1549   Elf32_Word hwp_flags2;
1550 } Elf_Options_Hw;
1551 
1552 
1553 
1554 #define OHWA0_R4KEOP_CHECKED	0x00000001
1555 #define OHWA1_R4KEOP_CLEAN	0x00000002
1556 
1557 
1558 
1559 #define R_MIPS_NONE		0
1560 #define R_MIPS_16		1
1561 #define R_MIPS_32		2
1562 #define R_MIPS_REL32		3
1563 #define R_MIPS_26		4
1564 #define R_MIPS_HI16		5
1565 #define R_MIPS_LO16		6
1566 #define R_MIPS_GPREL16		7
1567 #define R_MIPS_LITERAL		8
1568 #define R_MIPS_GOT16		9
1569 #define R_MIPS_PC16		10
1570 #define R_MIPS_CALL16		11
1571 #define R_MIPS_GPREL32		12
1572 
1573 #define R_MIPS_SHIFT5		16
1574 #define R_MIPS_SHIFT6		17
1575 #define R_MIPS_64		18
1576 #define R_MIPS_GOT_DISP		19
1577 #define R_MIPS_GOT_PAGE		20
1578 #define R_MIPS_GOT_OFST		21
1579 #define R_MIPS_GOT_HI16		22
1580 #define R_MIPS_GOT_LO16		23
1581 #define R_MIPS_SUB		24
1582 #define R_MIPS_INSERT_A		25
1583 #define R_MIPS_INSERT_B		26
1584 #define R_MIPS_DELETE		27
1585 #define R_MIPS_HIGHER		28
1586 #define R_MIPS_HIGHEST		29
1587 #define R_MIPS_CALL_HI16	30
1588 #define R_MIPS_CALL_LO16	31
1589 #define R_MIPS_SCN_DISP		32
1590 #define R_MIPS_REL16		33
1591 #define R_MIPS_ADD_IMMEDIATE	34
1592 #define R_MIPS_PJUMP		35
1593 #define R_MIPS_RELGOT		36
1594 #define R_MIPS_JALR		37
1595 #define R_MIPS_TLS_DTPMOD32	38
1596 #define R_MIPS_TLS_DTPREL32	39
1597 #define R_MIPS_TLS_DTPMOD64	40
1598 #define R_MIPS_TLS_DTPREL64	41
1599 #define R_MIPS_TLS_GD		42
1600 #define R_MIPS_TLS_LDM		43
1601 #define R_MIPS_TLS_DTPREL_HI16	44
1602 #define R_MIPS_TLS_DTPREL_LO16	45
1603 #define R_MIPS_TLS_GOTTPREL	46
1604 #define R_MIPS_TLS_TPREL32	47
1605 #define R_MIPS_TLS_TPREL64	48
1606 #define R_MIPS_TLS_TPREL_HI16	49
1607 #define R_MIPS_TLS_TPREL_LO16	50
1608 #define R_MIPS_GLOB_DAT		51
1609 #define R_MIPS_COPY		126
1610 #define R_MIPS_JUMP_SLOT        127
1611 
1612 #define R_MIPS_NUM		128
1613 
1614 
1615 
1616 #define PT_MIPS_REGINFO	0x70000000
1617 #define PT_MIPS_RTPROC  0x70000001
1618 #define PT_MIPS_OPTIONS 0x70000002
1619 #define PT_MIPS_ABIFLAGS 0x70000003
1620 
1621 
1622 
1623 #define PF_MIPS_LOCAL	0x10000000
1624 
1625 
1626 
1627 #define DT_MIPS_RLD_VERSION  0x70000001
1628 #define DT_MIPS_TIME_STAMP   0x70000002
1629 #define DT_MIPS_ICHECKSUM    0x70000003
1630 #define DT_MIPS_IVERSION     0x70000004
1631 #define DT_MIPS_FLAGS	     0x70000005
1632 #define DT_MIPS_BASE_ADDRESS 0x70000006
1633 #define DT_MIPS_MSYM	     0x70000007
1634 #define DT_MIPS_CONFLICT     0x70000008
1635 #define DT_MIPS_LIBLIST	     0x70000009
1636 #define DT_MIPS_LOCAL_GOTNO  0x7000000a
1637 #define DT_MIPS_CONFLICTNO   0x7000000b
1638 #define DT_MIPS_LIBLISTNO    0x70000010
1639 #define DT_MIPS_SYMTABNO     0x70000011
1640 #define DT_MIPS_UNREFEXTNO   0x70000012
1641 #define DT_MIPS_GOTSYM	     0x70000013
1642 #define DT_MIPS_HIPAGENO     0x70000014
1643 #define DT_MIPS_RLD_MAP	     0x70000016
1644 #define DT_MIPS_DELTA_CLASS  0x70000017
1645 #define DT_MIPS_DELTA_CLASS_NO    0x70000018
1646 
1647 #define DT_MIPS_DELTA_INSTANCE    0x70000019
1648 #define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
1649 
1650 #define DT_MIPS_DELTA_RELOC  0x7000001b
1651 #define DT_MIPS_DELTA_RELOC_NO 0x7000001c
1652 
1653 #define DT_MIPS_DELTA_SYM    0x7000001d
1654 
1655 #define DT_MIPS_DELTA_SYM_NO 0x7000001e
1656 
1657 #define DT_MIPS_DELTA_CLASSSYM 0x70000020
1658 
1659 #define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
1660 
1661 #define DT_MIPS_CXX_FLAGS    0x70000022
1662 #define DT_MIPS_PIXIE_INIT   0x70000023
1663 #define DT_MIPS_SYMBOL_LIB   0x70000024
1664 #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
1665 #define DT_MIPS_LOCAL_GOTIDX 0x70000026
1666 #define DT_MIPS_HIDDEN_GOTIDX 0x70000027
1667 #define DT_MIPS_PROTECTED_GOTIDX 0x70000028
1668 #define DT_MIPS_OPTIONS	     0x70000029
1669 #define DT_MIPS_INTERFACE    0x7000002a
1670 #define DT_MIPS_DYNSTR_ALIGN 0x7000002b
1671 #define DT_MIPS_INTERFACE_SIZE 0x7000002c
1672 #define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
1673 
1674 #define DT_MIPS_PERF_SUFFIX  0x7000002e
1675 
1676 #define DT_MIPS_COMPACT_SIZE 0x7000002f
1677 #define DT_MIPS_GP_VALUE     0x70000030
1678 #define DT_MIPS_AUX_DYNAMIC  0x70000031
1679 
1680 #define DT_MIPS_PLTGOT	     0x70000032
1681 
1682 #define DT_MIPS_RWPLT        0x70000034
1683 #define DT_MIPS_RLD_MAP_REL  0x70000035
1684 #define DT_MIPS_NUM	     0x36
1685 
1686 
1687 
1688 #define RHF_NONE		   0
1689 #define RHF_QUICKSTART		   (1 << 0)
1690 #define RHF_NOTPOT		   (1 << 1)
1691 #define RHF_NO_LIBRARY_REPLACEMENT (1 << 2)
1692 #define RHF_NO_MOVE		   (1 << 3)
1693 #define RHF_SGI_ONLY		   (1 << 4)
1694 #define RHF_GUARANTEE_INIT	   (1 << 5)
1695 #define RHF_DELTA_C_PLUS_PLUS	   (1 << 6)
1696 #define RHF_GUARANTEE_START_INIT   (1 << 7)
1697 #define RHF_PIXIE		   (1 << 8)
1698 #define RHF_DEFAULT_DELAY_LOAD	   (1 << 9)
1699 #define RHF_REQUICKSTART	   (1 << 10)
1700 #define RHF_REQUICKSTARTED	   (1 << 11)
1701 #define RHF_CORD		   (1 << 12)
1702 #define RHF_NO_UNRES_UNDEF	   (1 << 13)
1703 #define RHF_RLD_ORDER_SAFE	   (1 << 14)
1704 
1705 
1706 
1707 typedef struct {
1708   Elf32_Word l_name;
1709   Elf32_Word l_time_stamp;
1710   Elf32_Word l_checksum;
1711   Elf32_Word l_version;
1712   Elf32_Word l_flags;
1713 } Elf32_Lib;
1714 
1715 typedef struct {
1716   Elf64_Word l_name;
1717   Elf64_Word l_time_stamp;
1718   Elf64_Word l_checksum;
1719   Elf64_Word l_version;
1720   Elf64_Word l_flags;
1721 } Elf64_Lib;
1722 
1723 
1724 
1725 
1726 #define LL_NONE		  0
1727 #define LL_EXACT_MATCH	  (1 << 0)
1728 #define LL_IGNORE_INT_VER (1 << 1)
1729 #define LL_REQUIRE_MINOR  (1 << 2)
1730 #define LL_EXPORTS	  (1 << 3)
1731 #define LL_DELAY_LOAD	  (1 << 4)
1732 #define LL_DELTA	  (1 << 5)
1733 
1734 
1735 
1736 typedef Elf32_Addr Elf32_Conflict;
1737 
1738 typedef struct {
1739   Elf32_Half version;
1740   unsigned char isa_level;
1741   unsigned char isa_rev;
1742   unsigned char gpr_size;
1743   unsigned char cpr1_size;
1744   unsigned char cpr2_size;
1745   unsigned char fp_abi;
1746   Elf32_Word isa_ext;
1747   Elf32_Word ases;
1748   Elf32_Word flags1;
1749   Elf32_Word flags2;
1750 } Elf_MIPS_ABIFlags_v0;
1751 
1752 #define MIPS_AFL_REG_NONE	0x00
1753 #define MIPS_AFL_REG_32		0x01
1754 #define MIPS_AFL_REG_64		0x02
1755 #define MIPS_AFL_REG_128	0x03
1756 
1757 #define MIPS_AFL_ASE_DSP	0x00000001
1758 #define MIPS_AFL_ASE_DSPR2	0x00000002
1759 #define MIPS_AFL_ASE_EVA	0x00000004
1760 #define MIPS_AFL_ASE_MCU	0x00000008
1761 #define MIPS_AFL_ASE_MDMX	0x00000010
1762 #define MIPS_AFL_ASE_MIPS3D	0x00000020
1763 #define MIPS_AFL_ASE_MT		0x00000040
1764 #define MIPS_AFL_ASE_SMARTMIPS	0x00000080
1765 #define MIPS_AFL_ASE_VIRT	0x00000100
1766 #define MIPS_AFL_ASE_MSA	0x00000200
1767 #define MIPS_AFL_ASE_MIPS16	0x00000400
1768 #define MIPS_AFL_ASE_MICROMIPS	0x00000800
1769 #define MIPS_AFL_ASE_XPA	0x00001000
1770 #define MIPS_AFL_ASE_MASK	0x00001fff
1771 
1772 #define MIPS_AFL_EXT_XLR	  1
1773 #define MIPS_AFL_EXT_OCTEON2	  2
1774 #define MIPS_AFL_EXT_OCTEONP	  3
1775 #define MIPS_AFL_EXT_LOONGSON_3A  4
1776 #define MIPS_AFL_EXT_OCTEON	  5
1777 #define MIPS_AFL_EXT_5900	  6
1778 #define MIPS_AFL_EXT_4650	  7
1779 #define MIPS_AFL_EXT_4010	  8
1780 #define MIPS_AFL_EXT_4100	  9
1781 #define MIPS_AFL_EXT_3900	  10
1782 #define MIPS_AFL_EXT_10000	  11
1783 #define MIPS_AFL_EXT_SB1	  12
1784 #define MIPS_AFL_EXT_4111	  13
1785 #define MIPS_AFL_EXT_4120	  14
1786 #define MIPS_AFL_EXT_5400	  15
1787 #define MIPS_AFL_EXT_5500	  16
1788 #define MIPS_AFL_EXT_LOONGSON_2E  17
1789 #define MIPS_AFL_EXT_LOONGSON_2F  18
1790 
1791 #define MIPS_AFL_FLAGS1_ODDSPREG  1
1792 
1793 enum
1794 {
1795   Val_GNU_MIPS_ABI_FP_ANY = 0,
1796   Val_GNU_MIPS_ABI_FP_DOUBLE = 1,
1797   Val_GNU_MIPS_ABI_FP_SINGLE = 2,
1798   Val_GNU_MIPS_ABI_FP_SOFT = 3,
1799   Val_GNU_MIPS_ABI_FP_OLD_64 = 4,
1800   Val_GNU_MIPS_ABI_FP_XX = 5,
1801   Val_GNU_MIPS_ABI_FP_64 = 6,
1802   Val_GNU_MIPS_ABI_FP_64A = 7,
1803   Val_GNU_MIPS_ABI_FP_MAX = 7
1804 };
1805 
1806 
1807 
1808 
1809 #define EF_PARISC_TRAPNIL	0x00010000
1810 #define EF_PARISC_EXT		0x00020000
1811 #define EF_PARISC_LSB		0x00040000
1812 #define EF_PARISC_WIDE		0x00080000
1813 #define EF_PARISC_NO_KABP	0x00100000
1814 
1815 #define EF_PARISC_LAZYSWAP	0x00400000
1816 #define EF_PARISC_ARCH		0x0000ffff
1817 
1818 
1819 
1820 #define EFA_PARISC_1_0		    0x020b
1821 #define EFA_PARISC_1_1		    0x0210
1822 #define EFA_PARISC_2_0		    0x0214
1823 
1824 
1825 
1826 #define SHN_PARISC_ANSI_COMMON	0xff00
1827 
1828 #define SHN_PARISC_HUGE_COMMON	0xff01
1829 
1830 
1831 
1832 #define SHT_PARISC_EXT		0x70000000
1833 #define SHT_PARISC_UNWIND	0x70000001
1834 #define SHT_PARISC_DOC		0x70000002
1835 
1836 
1837 
1838 #define SHF_PARISC_SHORT	0x20000000
1839 #define SHF_PARISC_HUGE		0x40000000
1840 #define SHF_PARISC_SBP		0x80000000
1841 
1842 
1843 
1844 #define STT_PARISC_MILLICODE	13
1845 
1846 #define STT_HP_OPAQUE		(STT_LOOS + 0x1)
1847 #define STT_HP_STUB		(STT_LOOS + 0x2)
1848 
1849 
1850 
1851 #define R_PARISC_NONE		0
1852 #define R_PARISC_DIR32		1
1853 #define R_PARISC_DIR21L		2
1854 #define R_PARISC_DIR17R		3
1855 #define R_PARISC_DIR17F		4
1856 #define R_PARISC_DIR14R		6
1857 #define R_PARISC_PCREL32	9
1858 #define R_PARISC_PCREL21L	10
1859 #define R_PARISC_PCREL17R	11
1860 #define R_PARISC_PCREL17F	12
1861 #define R_PARISC_PCREL14R	14
1862 #define R_PARISC_DPREL21L	18
1863 #define R_PARISC_DPREL14R	22
1864 #define R_PARISC_GPREL21L	26
1865 #define R_PARISC_GPREL14R	30
1866 #define R_PARISC_LTOFF21L	34
1867 #define R_PARISC_LTOFF14R	38
1868 #define R_PARISC_SECREL32	41
1869 #define R_PARISC_SEGBASE	48
1870 #define R_PARISC_SEGREL32	49
1871 #define R_PARISC_PLTOFF21L	50
1872 #define R_PARISC_PLTOFF14R	54
1873 #define R_PARISC_LTOFF_FPTR32	57
1874 #define R_PARISC_LTOFF_FPTR21L	58
1875 #define R_PARISC_LTOFF_FPTR14R	62
1876 #define R_PARISC_FPTR64		64
1877 #define R_PARISC_PLABEL32	65
1878 #define R_PARISC_PLABEL21L	66
1879 #define R_PARISC_PLABEL14R	70
1880 #define R_PARISC_PCREL64	72
1881 #define R_PARISC_PCREL22F	74
1882 #define R_PARISC_PCREL14WR	75
1883 #define R_PARISC_PCREL14DR	76
1884 #define R_PARISC_PCREL16F	77
1885 #define R_PARISC_PCREL16WF	78
1886 #define R_PARISC_PCREL16DF	79
1887 #define R_PARISC_DIR64		80
1888 #define R_PARISC_DIR14WR	83
1889 #define R_PARISC_DIR14DR	84
1890 #define R_PARISC_DIR16F		85
1891 #define R_PARISC_DIR16WF	86
1892 #define R_PARISC_DIR16DF	87
1893 #define R_PARISC_GPREL64	88
1894 #define R_PARISC_GPREL14WR	91
1895 #define R_PARISC_GPREL14DR	92
1896 #define R_PARISC_GPREL16F	93
1897 #define R_PARISC_GPREL16WF	94
1898 #define R_PARISC_GPREL16DF	95
1899 #define R_PARISC_LTOFF64	96
1900 #define R_PARISC_LTOFF14WR	99
1901 #define R_PARISC_LTOFF14DR	100
1902 #define R_PARISC_LTOFF16F	101
1903 #define R_PARISC_LTOFF16WF	102
1904 #define R_PARISC_LTOFF16DF	103
1905 #define R_PARISC_SECREL64	104
1906 #define R_PARISC_SEGREL64	112
1907 #define R_PARISC_PLTOFF14WR	115
1908 #define R_PARISC_PLTOFF14DR	116
1909 #define R_PARISC_PLTOFF16F	117
1910 #define R_PARISC_PLTOFF16WF	118
1911 #define R_PARISC_PLTOFF16DF	119
1912 #define R_PARISC_LTOFF_FPTR64	120
1913 #define R_PARISC_LTOFF_FPTR14WR	123
1914 #define R_PARISC_LTOFF_FPTR14DR	124
1915 #define R_PARISC_LTOFF_FPTR16F	125
1916 #define R_PARISC_LTOFF_FPTR16WF	126
1917 #define R_PARISC_LTOFF_FPTR16DF	127
1918 #define R_PARISC_LORESERVE	128
1919 #define R_PARISC_COPY		128
1920 #define R_PARISC_IPLT		129
1921 #define R_PARISC_EPLT		130
1922 #define R_PARISC_TPREL32	153
1923 #define R_PARISC_TPREL21L	154
1924 #define R_PARISC_TPREL14R	158
1925 #define R_PARISC_LTOFF_TP21L	162
1926 #define R_PARISC_LTOFF_TP14R	166
1927 #define R_PARISC_LTOFF_TP14F	167
1928 #define R_PARISC_TPREL64	216
1929 #define R_PARISC_TPREL14WR	219
1930 #define R_PARISC_TPREL14DR	220
1931 #define R_PARISC_TPREL16F	221
1932 #define R_PARISC_TPREL16WF	222
1933 #define R_PARISC_TPREL16DF	223
1934 #define R_PARISC_LTOFF_TP64	224
1935 #define R_PARISC_LTOFF_TP14WR	227
1936 #define R_PARISC_LTOFF_TP14DR	228
1937 #define R_PARISC_LTOFF_TP16F	229
1938 #define R_PARISC_LTOFF_TP16WF	230
1939 #define R_PARISC_LTOFF_TP16DF	231
1940 #define R_PARISC_GNU_VTENTRY	232
1941 #define R_PARISC_GNU_VTINHERIT	233
1942 #define R_PARISC_TLS_GD21L	234
1943 #define R_PARISC_TLS_GD14R	235
1944 #define R_PARISC_TLS_GDCALL	236
1945 #define R_PARISC_TLS_LDM21L	237
1946 #define R_PARISC_TLS_LDM14R	238
1947 #define R_PARISC_TLS_LDMCALL	239
1948 #define R_PARISC_TLS_LDO21L	240
1949 #define R_PARISC_TLS_LDO14R	241
1950 #define R_PARISC_TLS_DTPMOD32	242
1951 #define R_PARISC_TLS_DTPMOD64	243
1952 #define R_PARISC_TLS_DTPOFF32	244
1953 #define R_PARISC_TLS_DTPOFF64	245
1954 #define R_PARISC_TLS_LE21L	R_PARISC_TPREL21L
1955 #define R_PARISC_TLS_LE14R	R_PARISC_TPREL14R
1956 #define R_PARISC_TLS_IE21L	R_PARISC_LTOFF_TP21L
1957 #define R_PARISC_TLS_IE14R	R_PARISC_LTOFF_TP14R
1958 #define R_PARISC_TLS_TPREL32	R_PARISC_TPREL32
1959 #define R_PARISC_TLS_TPREL64	R_PARISC_TPREL64
1960 #define R_PARISC_HIRESERVE	255
1961 
1962 
1963 
1964 #define PT_HP_TLS		(PT_LOOS + 0x0)
1965 #define PT_HP_CORE_NONE		(PT_LOOS + 0x1)
1966 #define PT_HP_CORE_VERSION	(PT_LOOS + 0x2)
1967 #define PT_HP_CORE_KERNEL	(PT_LOOS + 0x3)
1968 #define PT_HP_CORE_COMM		(PT_LOOS + 0x4)
1969 #define PT_HP_CORE_PROC		(PT_LOOS + 0x5)
1970 #define PT_HP_CORE_LOADABLE	(PT_LOOS + 0x6)
1971 #define PT_HP_CORE_STACK	(PT_LOOS + 0x7)
1972 #define PT_HP_CORE_SHM		(PT_LOOS + 0x8)
1973 #define PT_HP_CORE_MMF		(PT_LOOS + 0x9)
1974 #define PT_HP_PARALLEL		(PT_LOOS + 0x10)
1975 #define PT_HP_FASTBIND		(PT_LOOS + 0x11)
1976 #define PT_HP_OPT_ANNOT		(PT_LOOS + 0x12)
1977 #define PT_HP_HSL_ANNOT		(PT_LOOS + 0x13)
1978 #define PT_HP_STACK		(PT_LOOS + 0x14)
1979 
1980 #define PT_PARISC_ARCHEXT	0x70000000
1981 #define PT_PARISC_UNWIND	0x70000001
1982 
1983 
1984 
1985 #define PF_PARISC_SBP		0x08000000
1986 
1987 #define PF_HP_PAGE_SIZE		0x00100000
1988 #define PF_HP_FAR_SHARED	0x00200000
1989 #define PF_HP_NEAR_SHARED	0x00400000
1990 #define PF_HP_CODE		0x01000000
1991 #define PF_HP_MODIFY		0x02000000
1992 #define PF_HP_LAZYSWAP		0x04000000
1993 #define PF_HP_SBP		0x08000000
1994 
1995 
1996 
1997 
1998 
1999 
2000 #define EF_ALPHA_32BIT		1
2001 #define EF_ALPHA_CANRELAX	2
2002 
2003 
2004 
2005 
2006 #define SHT_ALPHA_DEBUG		0x70000001
2007 #define SHT_ALPHA_REGINFO	0x70000002
2008 
2009 
2010 
2011 #define SHF_ALPHA_GPREL		0x10000000
2012 
2013 
2014 #define STO_ALPHA_NOPV		0x80
2015 #define STO_ALPHA_STD_GPLOAD	0x88
2016 
2017 
2018 
2019 #define R_ALPHA_NONE		0
2020 #define R_ALPHA_REFLONG		1
2021 #define R_ALPHA_REFQUAD		2
2022 #define R_ALPHA_GPREL32		3
2023 #define R_ALPHA_LITERAL		4
2024 #define R_ALPHA_LITUSE		5
2025 #define R_ALPHA_GPDISP		6
2026 #define R_ALPHA_BRADDR		7
2027 #define R_ALPHA_HINT		8
2028 #define R_ALPHA_SREL16		9
2029 #define R_ALPHA_SREL32		10
2030 #define R_ALPHA_SREL64		11
2031 #define R_ALPHA_GPRELHIGH	17
2032 #define R_ALPHA_GPRELLOW	18
2033 #define R_ALPHA_GPREL16		19
2034 #define R_ALPHA_COPY		24
2035 #define R_ALPHA_GLOB_DAT	25
2036 #define R_ALPHA_JMP_SLOT	26
2037 #define R_ALPHA_RELATIVE	27
2038 #define R_ALPHA_TLS_GD_HI	28
2039 #define R_ALPHA_TLSGD		29
2040 #define R_ALPHA_TLS_LDM		30
2041 #define R_ALPHA_DTPMOD64	31
2042 #define R_ALPHA_GOTDTPREL	32
2043 #define R_ALPHA_DTPREL64	33
2044 #define R_ALPHA_DTPRELHI	34
2045 #define R_ALPHA_DTPRELLO	35
2046 #define R_ALPHA_DTPREL16	36
2047 #define R_ALPHA_GOTTPREL	37
2048 #define R_ALPHA_TPREL64		38
2049 #define R_ALPHA_TPRELHI		39
2050 #define R_ALPHA_TPRELLO		40
2051 #define R_ALPHA_TPREL16		41
2052 
2053 #define R_ALPHA_NUM		46
2054 
2055 
2056 #define LITUSE_ALPHA_ADDR	0
2057 #define LITUSE_ALPHA_BASE	1
2058 #define LITUSE_ALPHA_BYTOFF	2
2059 #define LITUSE_ALPHA_JSR	3
2060 #define LITUSE_ALPHA_TLS_GD	4
2061 #define LITUSE_ALPHA_TLS_LDM	5
2062 
2063 
2064 #define DT_ALPHA_PLTRO		(DT_LOPROC + 0)
2065 #define DT_ALPHA_NUM		1
2066 
2067 
2068 
2069 
2070 #define EF_PPC_EMB		0x80000000
2071 
2072 
2073 #define EF_PPC_RELOCATABLE	0x00010000
2074 #define EF_PPC_RELOCATABLE_LIB	0x00008000
2075 
2076 
2077 
2078 #define R_PPC_NONE		0
2079 #define R_PPC_ADDR32		1
2080 #define R_PPC_ADDR24		2
2081 #define R_PPC_ADDR16		3
2082 #define R_PPC_ADDR16_LO		4
2083 #define R_PPC_ADDR16_HI		5
2084 #define R_PPC_ADDR16_HA		6
2085 #define R_PPC_ADDR14		7
2086 #define R_PPC_ADDR14_BRTAKEN	8
2087 #define R_PPC_ADDR14_BRNTAKEN	9
2088 #define R_PPC_REL24		10
2089 #define R_PPC_REL14		11
2090 #define R_PPC_REL14_BRTAKEN	12
2091 #define R_PPC_REL14_BRNTAKEN	13
2092 #define R_PPC_GOT16		14
2093 #define R_PPC_GOT16_LO		15
2094 #define R_PPC_GOT16_HI		16
2095 #define R_PPC_GOT16_HA		17
2096 #define R_PPC_PLTREL24		18
2097 #define R_PPC_COPY		19
2098 #define R_PPC_GLOB_DAT		20
2099 #define R_PPC_JMP_SLOT		21
2100 #define R_PPC_RELATIVE		22
2101 #define R_PPC_LOCAL24PC		23
2102 #define R_PPC_UADDR32		24
2103 #define R_PPC_UADDR16		25
2104 #define R_PPC_REL32		26
2105 #define R_PPC_PLT32		27
2106 #define R_PPC_PLTREL32		28
2107 #define R_PPC_PLT16_LO		29
2108 #define R_PPC_PLT16_HI		30
2109 #define R_PPC_PLT16_HA		31
2110 #define R_PPC_SDAREL16		32
2111 #define R_PPC_SECTOFF		33
2112 #define R_PPC_SECTOFF_LO	34
2113 #define R_PPC_SECTOFF_HI	35
2114 #define R_PPC_SECTOFF_HA	36
2115 
2116 
2117 #define R_PPC_TLS		67
2118 #define R_PPC_DTPMOD32		68
2119 #define R_PPC_TPREL16		69
2120 #define R_PPC_TPREL16_LO	70
2121 #define R_PPC_TPREL16_HI	71
2122 #define R_PPC_TPREL16_HA	72
2123 #define R_PPC_TPREL32		73
2124 #define R_PPC_DTPREL16		74
2125 #define R_PPC_DTPREL16_LO	75
2126 #define R_PPC_DTPREL16_HI	76
2127 #define R_PPC_DTPREL16_HA	77
2128 #define R_PPC_DTPREL32		78
2129 #define R_PPC_GOT_TLSGD16	79
2130 #define R_PPC_GOT_TLSGD16_LO	80
2131 #define R_PPC_GOT_TLSGD16_HI	81
2132 #define R_PPC_GOT_TLSGD16_HA	82
2133 #define R_PPC_GOT_TLSLD16	83
2134 #define R_PPC_GOT_TLSLD16_LO	84
2135 #define R_PPC_GOT_TLSLD16_HI	85
2136 #define R_PPC_GOT_TLSLD16_HA	86
2137 #define R_PPC_GOT_TPREL16	87
2138 #define R_PPC_GOT_TPREL16_LO	88
2139 #define R_PPC_GOT_TPREL16_HI	89
2140 #define R_PPC_GOT_TPREL16_HA	90
2141 #define R_PPC_GOT_DTPREL16	91
2142 #define R_PPC_GOT_DTPREL16_LO	92
2143 #define R_PPC_GOT_DTPREL16_HI	93
2144 #define R_PPC_GOT_DTPREL16_HA	94
2145 #define R_PPC_TLSGD		95
2146 #define R_PPC_TLSLD		96
2147 
2148 
2149 #define R_PPC_EMB_NADDR32	101
2150 #define R_PPC_EMB_NADDR16	102
2151 #define R_PPC_EMB_NADDR16_LO	103
2152 #define R_PPC_EMB_NADDR16_HI	104
2153 #define R_PPC_EMB_NADDR16_HA	105
2154 #define R_PPC_EMB_SDAI16	106
2155 #define R_PPC_EMB_SDA2I16	107
2156 #define R_PPC_EMB_SDA2REL	108
2157 #define R_PPC_EMB_SDA21		109
2158 #define R_PPC_EMB_MRKREF	110
2159 #define R_PPC_EMB_RELSEC16	111
2160 #define R_PPC_EMB_RELST_LO	112
2161 #define R_PPC_EMB_RELST_HI	113
2162 #define R_PPC_EMB_RELST_HA	114
2163 #define R_PPC_EMB_BIT_FLD	115
2164 #define R_PPC_EMB_RELSDA	116
2165 
2166 
2167 #define R_PPC_DIAB_SDA21_LO	180
2168 #define R_PPC_DIAB_SDA21_HI	181
2169 #define R_PPC_DIAB_SDA21_HA	182
2170 #define R_PPC_DIAB_RELSDA_LO	183
2171 #define R_PPC_DIAB_RELSDA_HI	184
2172 #define R_PPC_DIAB_RELSDA_HA	185
2173 
2174 
2175 #define R_PPC_IRELATIVE		248
2176 
2177 
2178 #define R_PPC_REL16		249
2179 #define R_PPC_REL16_LO		250
2180 #define R_PPC_REL16_HI		251
2181 #define R_PPC_REL16_HA		252
2182 
2183 
2184 
2185 #define R_PPC_TOC16		255
2186 
2187 
2188 #define DT_PPC_GOT		(DT_LOPROC + 0)
2189 #define DT_PPC_OPT		(DT_LOPROC + 1)
2190 #define DT_PPC_NUM		2
2191 
2192 #define PPC_OPT_TLS		1
2193 
2194 
2195 #define R_PPC64_NONE		R_PPC_NONE
2196 #define R_PPC64_ADDR32		R_PPC_ADDR32
2197 #define R_PPC64_ADDR24		R_PPC_ADDR24
2198 #define R_PPC64_ADDR16		R_PPC_ADDR16
2199 #define R_PPC64_ADDR16_LO	R_PPC_ADDR16_LO
2200 #define R_PPC64_ADDR16_HI	R_PPC_ADDR16_HI
2201 #define R_PPC64_ADDR16_HA	R_PPC_ADDR16_HA
2202 #define R_PPC64_ADDR14		R_PPC_ADDR14
2203 #define R_PPC64_ADDR14_BRTAKEN	R_PPC_ADDR14_BRTAKEN
2204 #define R_PPC64_ADDR14_BRNTAKEN	R_PPC_ADDR14_BRNTAKEN
2205 #define R_PPC64_REL24		R_PPC_REL24
2206 #define R_PPC64_REL14		R_PPC_REL14
2207 #define R_PPC64_REL14_BRTAKEN	R_PPC_REL14_BRTAKEN
2208 #define R_PPC64_REL14_BRNTAKEN	R_PPC_REL14_BRNTAKEN
2209 #define R_PPC64_GOT16		R_PPC_GOT16
2210 #define R_PPC64_GOT16_LO	R_PPC_GOT16_LO
2211 #define R_PPC64_GOT16_HI	R_PPC_GOT16_HI
2212 #define R_PPC64_GOT16_HA	R_PPC_GOT16_HA
2213 
2214 #define R_PPC64_COPY		R_PPC_COPY
2215 #define R_PPC64_GLOB_DAT	R_PPC_GLOB_DAT
2216 #define R_PPC64_JMP_SLOT	R_PPC_JMP_SLOT
2217 #define R_PPC64_RELATIVE	R_PPC_RELATIVE
2218 
2219 #define R_PPC64_UADDR32		R_PPC_UADDR32
2220 #define R_PPC64_UADDR16		R_PPC_UADDR16
2221 #define R_PPC64_REL32		R_PPC_REL32
2222 #define R_PPC64_PLT32		R_PPC_PLT32
2223 #define R_PPC64_PLTREL32	R_PPC_PLTREL32
2224 #define R_PPC64_PLT16_LO	R_PPC_PLT16_LO
2225 #define R_PPC64_PLT16_HI	R_PPC_PLT16_HI
2226 #define R_PPC64_PLT16_HA	R_PPC_PLT16_HA
2227 
2228 #define R_PPC64_SECTOFF		R_PPC_SECTOFF
2229 #define R_PPC64_SECTOFF_LO	R_PPC_SECTOFF_LO
2230 #define R_PPC64_SECTOFF_HI	R_PPC_SECTOFF_HI
2231 #define R_PPC64_SECTOFF_HA	R_PPC_SECTOFF_HA
2232 #define R_PPC64_ADDR30		37
2233 #define R_PPC64_ADDR64		38
2234 #define R_PPC64_ADDR16_HIGHER	39
2235 #define R_PPC64_ADDR16_HIGHERA	40
2236 #define R_PPC64_ADDR16_HIGHEST	41
2237 #define R_PPC64_ADDR16_HIGHESTA	42
2238 #define R_PPC64_UADDR64		43
2239 #define R_PPC64_REL64		44
2240 #define R_PPC64_PLT64		45
2241 #define R_PPC64_PLTREL64	46
2242 #define R_PPC64_TOC16		47
2243 #define R_PPC64_TOC16_LO	48
2244 #define R_PPC64_TOC16_HI	49
2245 #define R_PPC64_TOC16_HA	50
2246 #define R_PPC64_TOC		51
2247 #define R_PPC64_PLTGOT16	52
2248 #define R_PPC64_PLTGOT16_LO	53
2249 #define R_PPC64_PLTGOT16_HI	54
2250 #define R_PPC64_PLTGOT16_HA	55
2251 
2252 #define R_PPC64_ADDR16_DS	56
2253 #define R_PPC64_ADDR16_LO_DS	57
2254 #define R_PPC64_GOT16_DS	58
2255 #define R_PPC64_GOT16_LO_DS	59
2256 #define R_PPC64_PLT16_LO_DS	60
2257 #define R_PPC64_SECTOFF_DS	61
2258 #define R_PPC64_SECTOFF_LO_DS	62
2259 #define R_PPC64_TOC16_DS	63
2260 #define R_PPC64_TOC16_LO_DS	64
2261 #define R_PPC64_PLTGOT16_DS	65
2262 #define R_PPC64_PLTGOT16_LO_DS	66
2263 
2264 
2265 #define R_PPC64_TLS		67
2266 #define R_PPC64_DTPMOD64	68
2267 #define R_PPC64_TPREL16		69
2268 #define R_PPC64_TPREL16_LO	70
2269 #define R_PPC64_TPREL16_HI	71
2270 #define R_PPC64_TPREL16_HA	72
2271 #define R_PPC64_TPREL64		73
2272 #define R_PPC64_DTPREL16	74
2273 #define R_PPC64_DTPREL16_LO	75
2274 #define R_PPC64_DTPREL16_HI	76
2275 #define R_PPC64_DTPREL16_HA	77
2276 #define R_PPC64_DTPREL64	78
2277 #define R_PPC64_GOT_TLSGD16	79
2278 #define R_PPC64_GOT_TLSGD16_LO	80
2279 #define R_PPC64_GOT_TLSGD16_HI	81
2280 #define R_PPC64_GOT_TLSGD16_HA	82
2281 #define R_PPC64_GOT_TLSLD16	83
2282 #define R_PPC64_GOT_TLSLD16_LO	84
2283 #define R_PPC64_GOT_TLSLD16_HI	85
2284 #define R_PPC64_GOT_TLSLD16_HA	86
2285 #define R_PPC64_GOT_TPREL16_DS	87
2286 #define R_PPC64_GOT_TPREL16_LO_DS 88
2287 #define R_PPC64_GOT_TPREL16_HI	89
2288 #define R_PPC64_GOT_TPREL16_HA	90
2289 #define R_PPC64_GOT_DTPREL16_DS	91
2290 #define R_PPC64_GOT_DTPREL16_LO_DS 92
2291 #define R_PPC64_GOT_DTPREL16_HI	93
2292 #define R_PPC64_GOT_DTPREL16_HA	94
2293 #define R_PPC64_TPREL16_DS	95
2294 #define R_PPC64_TPREL16_LO_DS	96
2295 #define R_PPC64_TPREL16_HIGHER	97
2296 #define R_PPC64_TPREL16_HIGHERA	98
2297 #define R_PPC64_TPREL16_HIGHEST	99
2298 #define R_PPC64_TPREL16_HIGHESTA 100
2299 #define R_PPC64_DTPREL16_DS	101
2300 #define R_PPC64_DTPREL16_LO_DS	102
2301 #define R_PPC64_DTPREL16_HIGHER	103
2302 #define R_PPC64_DTPREL16_HIGHERA 104
2303 #define R_PPC64_DTPREL16_HIGHEST 105
2304 #define R_PPC64_DTPREL16_HIGHESTA 106
2305 #define R_PPC64_TLSGD		107
2306 #define R_PPC64_TLSLD		108
2307 #define R_PPC64_TOCSAVE		109
2308 #define R_PPC64_ADDR16_HIGH	110
2309 #define R_PPC64_ADDR16_HIGHA	111
2310 #define R_PPC64_TPREL16_HIGH	112
2311 #define R_PPC64_TPREL16_HIGHA	113
2312 #define R_PPC64_DTPREL16_HIGH	114
2313 #define R_PPC64_DTPREL16_HIGHA	115
2314 
2315 
2316 #define R_PPC64_JMP_IREL	247
2317 #define R_PPC64_IRELATIVE	248
2318 #define R_PPC64_REL16		249
2319 #define R_PPC64_REL16_LO	250
2320 #define R_PPC64_REL16_HI	251
2321 #define R_PPC64_REL16_HA	252
2322 
2323 #define EF_PPC64_ABI	3
2324 
2325 #define DT_PPC64_GLINK  (DT_LOPROC + 0)
2326 #define DT_PPC64_OPD	(DT_LOPROC + 1)
2327 #define DT_PPC64_OPDSZ	(DT_LOPROC + 2)
2328 #define DT_PPC64_OPT	(DT_LOPROC + 3)
2329 #define DT_PPC64_NUM	4
2330 
2331 #define PPC64_OPT_TLS		1
2332 #define PPC64_OPT_MULTI_TOC	2
2333 #define PPC64_OPT_LOCALENTRY	4
2334 
2335 #define STO_PPC64_LOCAL_BIT	5
2336 #define STO_PPC64_LOCAL_MASK	0xe0
2337 #define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc)
2338 
2339 
2340 #define EF_ARM_RELEXEC		0x01
2341 #define EF_ARM_HASENTRY		0x02
2342 #define EF_ARM_INTERWORK	0x04
2343 #define EF_ARM_APCS_26		0x08
2344 #define EF_ARM_APCS_FLOAT	0x10
2345 #define EF_ARM_PIC		0x20
2346 #define EF_ARM_ALIGN8		0x40
2347 #define EF_ARM_NEW_ABI		0x80
2348 #define EF_ARM_OLD_ABI		0x100
2349 #define EF_ARM_SOFT_FLOAT	0x200
2350 #define EF_ARM_VFP_FLOAT	0x400
2351 #define EF_ARM_MAVERICK_FLOAT	0x800
2352 
2353 #define EF_ARM_ABI_FLOAT_SOFT	0x200
2354 #define EF_ARM_ABI_FLOAT_HARD	0x400
2355 
2356 
2357 #define EF_ARM_SYMSARESORTED	0x04
2358 #define EF_ARM_DYNSYMSUSESEGIDX	0x08
2359 #define EF_ARM_MAPSYMSFIRST	0x10
2360 #define EF_ARM_EABIMASK		0XFF000000
2361 
2362 
2363 #define EF_ARM_BE8	    0x00800000
2364 #define EF_ARM_LE8	    0x00400000
2365 
2366 #define EF_ARM_EABI_VERSION(flags)	((flags) & EF_ARM_EABIMASK)
2367 #define EF_ARM_EABI_UNKNOWN	0x00000000
2368 #define EF_ARM_EABI_VER1	0x01000000
2369 #define EF_ARM_EABI_VER2	0x02000000
2370 #define EF_ARM_EABI_VER3	0x03000000
2371 #define EF_ARM_EABI_VER4	0x04000000
2372 #define EF_ARM_EABI_VER5	0x05000000
2373 
2374 
2375 #define STT_ARM_TFUNC		STT_LOPROC
2376 #define STT_ARM_16BIT		STT_HIPROC
2377 
2378 
2379 #define SHF_ARM_ENTRYSECT	0x10000000
2380 #define SHF_ARM_COMDEF		0x80000000
2381 
2382 
2383 
2384 #define PF_ARM_SB		0x10000000
2385 
2386 #define PF_ARM_PI		0x20000000
2387 #define PF_ARM_ABS		0x40000000
2388 
2389 
2390 #define PT_ARM_EXIDX		(PT_LOPROC + 1)
2391 
2392 
2393 #define SHT_ARM_EXIDX		(SHT_LOPROC + 1)
2394 #define SHT_ARM_PREEMPTMAP	(SHT_LOPROC + 2)
2395 #define SHT_ARM_ATTRIBUTES	(SHT_LOPROC + 3)
2396 
2397 #define R_AARCH64_NONE            0
2398 #define R_AARCH64_P32_ABS32	1
2399 #define R_AARCH64_P32_COPY	180
2400 #define R_AARCH64_P32_GLOB_DAT	181
2401 #define R_AARCH64_P32_JUMP_SLOT	182
2402 #define R_AARCH64_P32_RELATIVE	183
2403 #define R_AARCH64_P32_TLS_DTPMOD 184
2404 #define R_AARCH64_P32_TLS_DTPREL 185
2405 #define R_AARCH64_P32_TLS_TPREL	186
2406 #define R_AARCH64_P32_TLSDESC	187
2407 #define R_AARCH64_P32_IRELATIVE	188
2408 #define R_AARCH64_ABS64         257
2409 #define R_AARCH64_ABS32         258
2410 #define R_AARCH64_ABS16		259
2411 #define R_AARCH64_PREL64	260
2412 #define R_AARCH64_PREL32	261
2413 #define R_AARCH64_PREL16	262
2414 #define R_AARCH64_MOVW_UABS_G0	263
2415 #define R_AARCH64_MOVW_UABS_G0_NC 264
2416 #define R_AARCH64_MOVW_UABS_G1	265
2417 #define R_AARCH64_MOVW_UABS_G1_NC 266
2418 #define R_AARCH64_MOVW_UABS_G2	267
2419 #define R_AARCH64_MOVW_UABS_G2_NC 268
2420 #define R_AARCH64_MOVW_UABS_G3	269
2421 #define R_AARCH64_MOVW_SABS_G0	270
2422 #define R_AARCH64_MOVW_SABS_G1	271
2423 #define R_AARCH64_MOVW_SABS_G2	272
2424 #define R_AARCH64_LD_PREL_LO19	273
2425 #define R_AARCH64_ADR_PREL_LO21	274
2426 #define R_AARCH64_ADR_PREL_PG_HI21 275
2427 #define R_AARCH64_ADR_PREL_PG_HI21_NC 276
2428 #define R_AARCH64_ADD_ABS_LO12_NC 277
2429 #define R_AARCH64_LDST8_ABS_LO12_NC 278
2430 #define R_AARCH64_TSTBR14	279
2431 #define R_AARCH64_CONDBR19	280
2432 #define R_AARCH64_JUMP26	282
2433 #define R_AARCH64_CALL26	283
2434 #define R_AARCH64_LDST16_ABS_LO12_NC 284
2435 #define R_AARCH64_LDST32_ABS_LO12_NC 285
2436 #define R_AARCH64_LDST64_ABS_LO12_NC 286
2437 #define R_AARCH64_MOVW_PREL_G0	287
2438 #define R_AARCH64_MOVW_PREL_G0_NC 288
2439 #define R_AARCH64_MOVW_PREL_G1	289
2440 #define R_AARCH64_MOVW_PREL_G1_NC 290
2441 #define R_AARCH64_MOVW_PREL_G2	291
2442 #define R_AARCH64_MOVW_PREL_G2_NC 292
2443 #define R_AARCH64_MOVW_PREL_G3	293
2444 #define R_AARCH64_LDST128_ABS_LO12_NC 299
2445 #define R_AARCH64_MOVW_GOTOFF_G0 300
2446 #define R_AARCH64_MOVW_GOTOFF_G0_NC 301
2447 #define R_AARCH64_MOVW_GOTOFF_G1 302
2448 #define R_AARCH64_MOVW_GOTOFF_G1_NC 303
2449 #define R_AARCH64_MOVW_GOTOFF_G2 304
2450 #define R_AARCH64_MOVW_GOTOFF_G2_NC 305
2451 #define R_AARCH64_MOVW_GOTOFF_G3 306
2452 #define R_AARCH64_GOTREL64	307
2453 #define R_AARCH64_GOTREL32	308
2454 #define R_AARCH64_GOT_LD_PREL19	309
2455 #define R_AARCH64_LD64_GOTOFF_LO15 310
2456 #define R_AARCH64_ADR_GOT_PAGE	311
2457 #define R_AARCH64_LD64_GOT_LO12_NC 312
2458 #define R_AARCH64_LD64_GOTPAGE_LO15 313
2459 #define R_AARCH64_TLSGD_ADR_PREL21 512
2460 #define R_AARCH64_TLSGD_ADR_PAGE21 513
2461 #define R_AARCH64_TLSGD_ADD_LO12_NC 514
2462 #define R_AARCH64_TLSGD_MOVW_G1	515
2463 #define R_AARCH64_TLSGD_MOVW_G0_NC 516
2464 #define R_AARCH64_TLSLD_ADR_PREL21 517
2465 #define R_AARCH64_TLSLD_ADR_PAGE21 518
2466 #define R_AARCH64_TLSLD_ADD_LO12_NC 519
2467 #define R_AARCH64_TLSLD_MOVW_G1	520
2468 #define R_AARCH64_TLSLD_MOVW_G0_NC 521
2469 #define R_AARCH64_TLSLD_LD_PREL19 522
2470 #define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523
2471 #define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524
2472 #define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525
2473 #define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526
2474 #define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527
2475 #define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528
2476 #define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529
2477 #define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530
2478 #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531
2479 #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532
2480 #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533
2481 #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534
2482 #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535
2483 #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536
2484 #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537
2485 #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538
2486 #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539
2487 #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540
2488 #define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541
2489 #define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542
2490 #define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543
2491 #define R_AARCH64_TLSLE_MOVW_TPREL_G2 544
2492 #define R_AARCH64_TLSLE_MOVW_TPREL_G1 545
2493 #define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546
2494 #define R_AARCH64_TLSLE_MOVW_TPREL_G0 547
2495 #define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548
2496 #define R_AARCH64_TLSLE_ADD_TPREL_HI12 549
2497 #define R_AARCH64_TLSLE_ADD_TPREL_LO12 550
2498 #define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551
2499 #define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552
2500 #define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553
2501 #define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554
2502 #define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555
2503 #define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556
2504 #define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557
2505 #define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558
2506 #define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559
2507 #define R_AARCH64_TLSDESC_LD_PREL19 560
2508 #define R_AARCH64_TLSDESC_ADR_PREL21 561
2509 #define R_AARCH64_TLSDESC_ADR_PAGE21 562
2510 #define R_AARCH64_TLSDESC_LD64_LO12 563
2511 #define R_AARCH64_TLSDESC_ADD_LO12 564
2512 #define R_AARCH64_TLSDESC_OFF_G1 565
2513 #define R_AARCH64_TLSDESC_OFF_G0_NC 566
2514 #define R_AARCH64_TLSDESC_LDR	567
2515 #define R_AARCH64_TLSDESC_ADD	568
2516 #define R_AARCH64_TLSDESC_CALL	569
2517 #define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570
2518 #define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571
2519 #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572
2520 #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573
2521 #define R_AARCH64_AUTH_ABS64 580
2522 #define R_AARCH64_COPY         1024
2523 #define R_AARCH64_GLOB_DAT     1025
2524 #define R_AARCH64_JUMP_SLOT    1026
2525 #define R_AARCH64_RELATIVE     1027
2526 #define R_AARCH64_TLS_DTPMOD   1028
2527 #define R_AARCH64_TLS_DTPMOD64 1028
2528 #define R_AARCH64_TLS_DTPREL   1029
2529 #define R_AARCH64_TLS_DTPREL64 1029
2530 #define R_AARCH64_TLS_TPREL    1030
2531 #define R_AARCH64_TLS_TPREL64  1030
2532 #define R_AARCH64_TLSDESC      1031
2533 #define R_AARCH64_AUTH_RELATIVE 1041
2534 #define R_AARCH64_AUTH_GLOB_DAT 1042
2535 
2536 #define R_ARM_NONE		0
2537 #define R_ARM_PC24		1
2538 #define R_ARM_ABS32		2
2539 #define R_ARM_REL32		3
2540 #define R_ARM_PC13		4
2541 #define R_ARM_ABS16		5
2542 #define R_ARM_ABS12		6
2543 #define R_ARM_THM_ABS5		7
2544 #define R_ARM_ABS8		8
2545 #define R_ARM_SBREL32		9
2546 #define R_ARM_THM_PC22		10
2547 #define R_ARM_THM_PC8		11
2548 #define R_ARM_AMP_VCALL9	12
2549 #define R_ARM_TLS_DESC		13
2550 #define R_ARM_THM_SWI8		14
2551 #define R_ARM_XPC25		15
2552 #define R_ARM_THM_XPC22		16
2553 #define R_ARM_TLS_DTPMOD32	17
2554 #define R_ARM_TLS_DTPOFF32	18
2555 #define R_ARM_TLS_TPOFF32	19
2556 #define R_ARM_COPY		20
2557 #define R_ARM_GLOB_DAT		21
2558 #define R_ARM_JUMP_SLOT		22
2559 #define R_ARM_RELATIVE		23
2560 #define R_ARM_GOTOFF		24
2561 #define R_ARM_GOTPC		25
2562 #define R_ARM_GOT32		26
2563 #define R_ARM_PLT32		27
2564 #define R_ARM_CALL		28
2565 #define R_ARM_JUMP24		29
2566 #define R_ARM_THM_JUMP24	30
2567 #define R_ARM_BASE_ABS		31
2568 #define R_ARM_ALU_PCREL_7_0	32
2569 #define R_ARM_ALU_PCREL_15_8	33
2570 #define R_ARM_ALU_PCREL_23_15	34
2571 #define R_ARM_LDR_SBREL_11_0	35
2572 #define R_ARM_ALU_SBREL_19_12	36
2573 #define R_ARM_ALU_SBREL_27_20	37
2574 #define R_ARM_TARGET1		38
2575 #define R_ARM_SBREL31		39
2576 #define R_ARM_V4BX		40
2577 #define R_ARM_TARGET2		41
2578 #define R_ARM_PREL31		42
2579 #define R_ARM_MOVW_ABS_NC	43
2580 #define R_ARM_MOVT_ABS		44
2581 #define R_ARM_MOVW_PREL_NC	45
2582 #define R_ARM_MOVT_PREL		46
2583 #define R_ARM_THM_MOVW_ABS_NC	47
2584 #define R_ARM_THM_MOVT_ABS	48
2585 #define R_ARM_THM_MOVW_PREL_NC	49
2586 #define R_ARM_THM_MOVT_PREL	50
2587 #define R_ARM_THM_JUMP19	51
2588 #define R_ARM_THM_JUMP6		52
2589 #define R_ARM_THM_ALU_PREL_11_0	53
2590 #define R_ARM_THM_PC12		54
2591 #define R_ARM_ABS32_NOI		55
2592 #define R_ARM_REL32_NOI		56
2593 #define R_ARM_ALU_PC_G0_NC	57
2594 #define R_ARM_ALU_PC_G0		58
2595 #define R_ARM_ALU_PC_G1_NC	59
2596 #define R_ARM_ALU_PC_G1		60
2597 #define R_ARM_ALU_PC_G2		61
2598 #define R_ARM_LDR_PC_G1		62
2599 #define R_ARM_LDR_PC_G2		63
2600 #define R_ARM_LDRS_PC_G0	64
2601 #define R_ARM_LDRS_PC_G1	65
2602 #define R_ARM_LDRS_PC_G2	66
2603 #define R_ARM_LDC_PC_G0		67
2604 #define R_ARM_LDC_PC_G1		68
2605 #define R_ARM_LDC_PC_G2		69
2606 #define R_ARM_ALU_SB_G0_NC	70
2607 #define R_ARM_ALU_SB_G0		71
2608 #define R_ARM_ALU_SB_G1_NC	72
2609 #define R_ARM_ALU_SB_G1		73
2610 #define R_ARM_ALU_SB_G2		74
2611 #define R_ARM_LDR_SB_G0		75
2612 #define R_ARM_LDR_SB_G1		76
2613 #define R_ARM_LDR_SB_G2		77
2614 #define R_ARM_LDRS_SB_G0	78
2615 #define R_ARM_LDRS_SB_G1	79
2616 #define R_ARM_LDRS_SB_G2	80
2617 #define R_ARM_LDC_SB_G0		81
2618 #define R_ARM_LDC_SB_G1		82
2619 #define R_ARM_LDC_SB_G2		83
2620 #define R_ARM_MOVW_BREL_NC	84
2621 #define R_ARM_MOVT_BREL		85
2622 #define R_ARM_MOVW_BREL		86
2623 #define R_ARM_THM_MOVW_BREL_NC	87
2624 #define R_ARM_THM_MOVT_BREL	88
2625 #define R_ARM_THM_MOVW_BREL	89
2626 #define R_ARM_TLS_GOTDESC	90
2627 #define R_ARM_TLS_CALL		91
2628 #define R_ARM_TLS_DESCSEQ	92
2629 #define R_ARM_THM_TLS_CALL	93
2630 #define R_ARM_PLT32_ABS		94
2631 #define R_ARM_GOT_ABS		95
2632 #define R_ARM_GOT_PREL		96
2633 #define R_ARM_GOT_BREL12	97
2634 #define R_ARM_GOTOFF12		98
2635 #define R_ARM_GOTRELAX		99
2636 #define R_ARM_GNU_VTENTRY	100
2637 #define R_ARM_GNU_VTINHERIT	101
2638 #define R_ARM_THM_PC11		102
2639 #define R_ARM_THM_PC9		103
2640 #define R_ARM_TLS_GD32		104
2641 
2642 #define R_ARM_TLS_LDM32		105
2643 
2644 #define R_ARM_TLS_LDO32		106
2645 
2646 #define R_ARM_TLS_IE32		107
2647 
2648 #define R_ARM_TLS_LE32		108
2649 #define R_ARM_TLS_LDO12		109
2650 #define R_ARM_TLS_LE12		110
2651 #define R_ARM_TLS_IE12GP	111
2652 #define R_ARM_ME_TOO		128
2653 #define R_ARM_THM_TLS_DESCSEQ	129
2654 #define R_ARM_THM_TLS_DESCSEQ16	129
2655 #define R_ARM_THM_TLS_DESCSEQ32	130
2656 #define R_ARM_THM_GOT_BREL12	131
2657 #define R_ARM_IRELATIVE		160
2658 #define R_ARM_RXPC25		249
2659 #define R_ARM_RSBREL32		250
2660 #define R_ARM_THM_RPC22		251
2661 #define R_ARM_RREL32		252
2662 #define R_ARM_RABS22		253
2663 #define R_ARM_RPC24		254
2664 #define R_ARM_RBASE		255
2665 
2666 #define R_ARM_NUM		256
2667 
2668 
2669 #define R_CKCORE_NONE               0
2670 #define R_CKCORE_ADDR32             1
2671 #define R_CKCORE_PCRELIMM8BY4       2
2672 #define R_CKCORE_PCRELIMM11BY2      3
2673 #define R_CKCORE_PCREL32            5
2674 #define R_CKCORE_PCRELJSR_IMM11BY2  6
2675 #define R_CKCORE_RELATIVE           9
2676 #define R_CKCORE_COPY               10
2677 #define R_CKCORE_GLOB_DAT           11
2678 #define R_CKCORE_JUMP_SLOT          12
2679 #define R_CKCORE_GOTOFF             13
2680 #define R_CKCORE_GOTPC              14
2681 #define R_CKCORE_GOT32              15
2682 #define R_CKCORE_PLT32              16
2683 #define R_CKCORE_ADDRGOT            17
2684 #define R_CKCORE_ADDRPLT            18
2685 #define R_CKCORE_PCREL_IMM26BY2     19
2686 #define R_CKCORE_PCREL_IMM16BY2     20
2687 #define R_CKCORE_PCREL_IMM16BY4     21
2688 #define R_CKCORE_PCREL_IMM10BY2     22
2689 #define R_CKCORE_PCREL_IMM10BY4     23
2690 #define R_CKCORE_ADDR_HI16          24
2691 #define R_CKCORE_ADDR_LO16          25
2692 #define R_CKCORE_GOTPC_HI16         26
2693 #define R_CKCORE_GOTPC_LO16         27
2694 #define R_CKCORE_GOTOFF_HI16        28
2695 #define R_CKCORE_GOTOFF_LO16        29
2696 #define R_CKCORE_GOT12              30
2697 #define R_CKCORE_GOT_HI16           31
2698 #define R_CKCORE_GOT_LO16           32
2699 #define R_CKCORE_PLT12              33
2700 #define R_CKCORE_PLT_HI16           34
2701 #define R_CKCORE_PLT_LO16           35
2702 #define R_CKCORE_ADDRGOT_HI16       36
2703 #define R_CKCORE_ADDRGOT_LO16       37
2704 #define R_CKCORE_ADDRPLT_HI16       38
2705 #define R_CKCORE_ADDRPLT_LO16       39
2706 #define R_CKCORE_PCREL_JSR_IMM26BY2 40
2707 #define R_CKCORE_TOFFSET_LO16       41
2708 #define R_CKCORE_DOFFSET_LO16       42
2709 #define R_CKCORE_PCREL_IMM18BY2     43
2710 #define R_CKCORE_DOFFSET_IMM18      44
2711 #define R_CKCORE_DOFFSET_IMM18BY2   45
2712 #define R_CKCORE_DOFFSET_IMM18BY4   46
2713 #define R_CKCORE_GOT_IMM18BY4       48
2714 #define R_CKCORE_PLT_IMM18BY4       49
2715 #define R_CKCORE_PCREL_IMM7BY4      50
2716 #define R_CKCORE_TLS_LE32           51
2717 #define R_CKCORE_TLS_IE32           52
2718 #define R_CKCORE_TLS_GD32           53
2719 #define R_CKCORE_TLS_LDM32          54
2720 #define R_CKCORE_TLS_LDO32          55
2721 #define R_CKCORE_TLS_DTPMOD32       56
2722 #define R_CKCORE_TLS_DTPOFF32       57
2723 #define R_CKCORE_TLS_TPOFF32        58
2724 
2725 
2726 #define EF_IA_64_MASKOS		0x0000000f
2727 #define EF_IA_64_ABI64		0x00000010
2728 #define EF_IA_64_ARCH		0xff000000
2729 
2730 
2731 #define PT_IA_64_ARCHEXT	(PT_LOPROC + 0)
2732 #define PT_IA_64_UNWIND		(PT_LOPROC + 1)
2733 #define PT_IA_64_HP_OPT_ANOT	(PT_LOOS + 0x12)
2734 #define PT_IA_64_HP_HSL_ANOT	(PT_LOOS + 0x13)
2735 #define PT_IA_64_HP_STACK	(PT_LOOS + 0x14)
2736 
2737 
2738 #define PF_IA_64_NORECOV	0x80000000
2739 
2740 
2741 #define SHT_IA_64_EXT		(SHT_LOPROC + 0)
2742 #define SHT_IA_64_UNWIND	(SHT_LOPROC + 1)
2743 
2744 
2745 #define SHF_IA_64_SHORT		0x10000000
2746 #define SHF_IA_64_NORECOV	0x20000000
2747 
2748 
2749 #define DT_IA_64_PLT_RESERVE	(DT_LOPROC + 0)
2750 #define DT_IA_64_NUM		1
2751 
2752 
2753 #define R_IA64_NONE		0x00
2754 #define R_IA64_IMM14		0x21
2755 #define R_IA64_IMM22		0x22
2756 #define R_IA64_IMM64		0x23
2757 #define R_IA64_DIR32MSB		0x24
2758 #define R_IA64_DIR32LSB		0x25
2759 #define R_IA64_DIR64MSB		0x26
2760 #define R_IA64_DIR64LSB		0x27
2761 #define R_IA64_GPREL22		0x2a
2762 #define R_IA64_GPREL64I		0x2b
2763 #define R_IA64_GPREL32MSB	0x2c
2764 #define R_IA64_GPREL32LSB	0x2d
2765 #define R_IA64_GPREL64MSB	0x2e
2766 #define R_IA64_GPREL64LSB	0x2f
2767 #define R_IA64_LTOFF22		0x32
2768 #define R_IA64_LTOFF64I		0x33
2769 #define R_IA64_PLTOFF22		0x3a
2770 #define R_IA64_PLTOFF64I	0x3b
2771 #define R_IA64_PLTOFF64MSB	0x3e
2772 #define R_IA64_PLTOFF64LSB	0x3f
2773 #define R_IA64_FPTR64I		0x43
2774 #define R_IA64_FPTR32MSB	0x44
2775 #define R_IA64_FPTR32LSB	0x45
2776 #define R_IA64_FPTR64MSB	0x46
2777 #define R_IA64_FPTR64LSB	0x47
2778 #define R_IA64_PCREL60B		0x48
2779 #define R_IA64_PCREL21B		0x49
2780 #define R_IA64_PCREL21M		0x4a
2781 #define R_IA64_PCREL21F		0x4b
2782 #define R_IA64_PCREL32MSB	0x4c
2783 #define R_IA64_PCREL32LSB	0x4d
2784 #define R_IA64_PCREL64MSB	0x4e
2785 #define R_IA64_PCREL64LSB	0x4f
2786 #define R_IA64_LTOFF_FPTR22	0x52
2787 #define R_IA64_LTOFF_FPTR64I	0x53
2788 #define R_IA64_LTOFF_FPTR32MSB	0x54
2789 #define R_IA64_LTOFF_FPTR32LSB	0x55
2790 #define R_IA64_LTOFF_FPTR64MSB	0x56
2791 #define R_IA64_LTOFF_FPTR64LSB	0x57
2792 #define R_IA64_SEGREL32MSB	0x5c
2793 #define R_IA64_SEGREL32LSB	0x5d
2794 #define R_IA64_SEGREL64MSB	0x5e
2795 #define R_IA64_SEGREL64LSB	0x5f
2796 #define R_IA64_SECREL32MSB	0x64
2797 #define R_IA64_SECREL32LSB	0x65
2798 #define R_IA64_SECREL64MSB	0x66
2799 #define R_IA64_SECREL64LSB	0x67
2800 #define R_IA64_REL32MSB		0x6c
2801 #define R_IA64_REL32LSB		0x6d
2802 #define R_IA64_REL64MSB		0x6e
2803 #define R_IA64_REL64LSB		0x6f
2804 #define R_IA64_LTV32MSB		0x74
2805 #define R_IA64_LTV32LSB		0x75
2806 #define R_IA64_LTV64MSB		0x76
2807 #define R_IA64_LTV64LSB		0x77
2808 #define R_IA64_PCREL21BI	0x79
2809 #define R_IA64_PCREL22		0x7a
2810 #define R_IA64_PCREL64I		0x7b
2811 #define R_IA64_IPLTMSB		0x80
2812 #define R_IA64_IPLTLSB		0x81
2813 #define R_IA64_COPY		0x84
2814 #define R_IA64_SUB		0x85
2815 #define R_IA64_LTOFF22X		0x86
2816 #define R_IA64_LDXMOV		0x87
2817 #define R_IA64_TPREL14		0x91
2818 #define R_IA64_TPREL22		0x92
2819 #define R_IA64_TPREL64I		0x93
2820 #define R_IA64_TPREL64MSB	0x96
2821 #define R_IA64_TPREL64LSB	0x97
2822 #define R_IA64_LTOFF_TPREL22	0x9a
2823 #define R_IA64_DTPMOD64MSB	0xa6
2824 #define R_IA64_DTPMOD64LSB	0xa7
2825 #define R_IA64_LTOFF_DTPMOD22	0xaa
2826 #define R_IA64_DTPREL14		0xb1
2827 #define R_IA64_DTPREL22		0xb2
2828 #define R_IA64_DTPREL64I	0xb3
2829 #define R_IA64_DTPREL32MSB	0xb4
2830 #define R_IA64_DTPREL32LSB	0xb5
2831 #define R_IA64_DTPREL64MSB	0xb6
2832 #define R_IA64_DTPREL64LSB	0xb7
2833 #define R_IA64_LTOFF_DTPREL22	0xba
2834 
2835 
2836 #define EF_SH_MACH_MASK		0x1f
2837 #define EF_SH_UNKNOWN		0x0
2838 #define EF_SH1			0x1
2839 #define EF_SH2			0x2
2840 #define EF_SH3			0x3
2841 #define EF_SH_DSP		0x4
2842 #define EF_SH3_DSP		0x5
2843 #define EF_SH4AL_DSP		0x6
2844 #define EF_SH3E			0x8
2845 #define EF_SH4			0x9
2846 #define EF_SH2E			0xb
2847 #define EF_SH4A			0xc
2848 #define EF_SH2A			0xd
2849 #define EF_SH4_NOFPU		0x10
2850 #define EF_SH4A_NOFPU		0x11
2851 #define EF_SH4_NOMMU_NOFPU	0x12
2852 #define EF_SH2A_NOFPU		0x13
2853 #define EF_SH3_NOMMU		0x14
2854 #define EF_SH2A_SH4_NOFPU	0x15
2855 #define EF_SH2A_SH3_NOFPU	0x16
2856 #define EF_SH2A_SH4		0x17
2857 #define EF_SH2A_SH3E		0x18
2858 
2859 #define	R_SH_NONE		0
2860 #define	R_SH_DIR32		1
2861 #define	R_SH_REL32		2
2862 #define	R_SH_DIR8WPN		3
2863 #define	R_SH_IND12W		4
2864 #define	R_SH_DIR8WPL		5
2865 #define	R_SH_DIR8WPZ		6
2866 #define	R_SH_DIR8BP		7
2867 #define	R_SH_DIR8W		8
2868 #define	R_SH_DIR8L		9
2869 #define	R_SH_SWITCH16		25
2870 #define	R_SH_SWITCH32		26
2871 #define	R_SH_USES		27
2872 #define	R_SH_COUNT		28
2873 #define	R_SH_ALIGN		29
2874 #define	R_SH_CODE		30
2875 #define	R_SH_DATA		31
2876 #define	R_SH_LABEL		32
2877 #define	R_SH_SWITCH8		33
2878 #define	R_SH_GNU_VTINHERIT	34
2879 #define	R_SH_GNU_VTENTRY	35
2880 #define	R_SH_TLS_GD_32		144
2881 #define	R_SH_TLS_LD_32		145
2882 #define	R_SH_TLS_LDO_32		146
2883 #define	R_SH_TLS_IE_32		147
2884 #define	R_SH_TLS_LE_32		148
2885 #define	R_SH_TLS_DTPMOD32	149
2886 #define	R_SH_TLS_DTPOFF32	150
2887 #define	R_SH_TLS_TPOFF32	151
2888 #define	R_SH_GOT32		160
2889 #define	R_SH_PLT32		161
2890 #define	R_SH_COPY		162
2891 #define	R_SH_GLOB_DAT		163
2892 #define	R_SH_JMP_SLOT		164
2893 #define	R_SH_RELATIVE		165
2894 #define	R_SH_GOTOFF		166
2895 #define	R_SH_GOTPC		167
2896 #define	R_SH_GOT20		201
2897 #define	R_SH_GOTOFF20		202
2898 #define	R_SH_GOTFUNCDESC	203
2899 #define	R_SH_GOTFUNCDEST20	204
2900 #define	R_SH_GOTOFFFUNCDESC	205
2901 #define	R_SH_GOTOFFFUNCDEST20	206
2902 #define	R_SH_FUNCDESC		207
2903 #define	R_SH_FUNCDESC_VALUE	208
2904 
2905 #define	R_SH_NUM		256
2906 
2907 
2908 
2909 #define R_390_NONE		0
2910 #define R_390_8			1
2911 #define R_390_12		2
2912 #define R_390_16		3
2913 #define R_390_32		4
2914 #define R_390_PC32		5
2915 #define R_390_GOT12		6
2916 #define R_390_GOT32		7
2917 #define R_390_PLT32		8
2918 #define R_390_COPY		9
2919 #define R_390_GLOB_DAT		10
2920 #define R_390_JMP_SLOT		11
2921 #define R_390_RELATIVE		12
2922 #define R_390_GOTOFF32		13
2923 #define R_390_GOTPC		14
2924 #define R_390_GOT16		15
2925 #define R_390_PC16		16
2926 #define R_390_PC16DBL		17
2927 #define R_390_PLT16DBL		18
2928 #define R_390_PC32DBL		19
2929 #define R_390_PLT32DBL		20
2930 #define R_390_GOTPCDBL		21
2931 #define R_390_64		22
2932 #define R_390_PC64		23
2933 #define R_390_GOT64		24
2934 #define R_390_PLT64		25
2935 #define R_390_GOTENT		26
2936 #define R_390_GOTOFF16		27
2937 #define R_390_GOTOFF64		28
2938 #define R_390_GOTPLT12		29
2939 #define R_390_GOTPLT16		30
2940 #define R_390_GOTPLT32		31
2941 #define R_390_GOTPLT64		32
2942 #define R_390_GOTPLTENT		33
2943 #define R_390_PLTOFF16		34
2944 #define R_390_PLTOFF32		35
2945 #define R_390_PLTOFF64		36
2946 #define R_390_TLS_LOAD		37
2947 #define R_390_TLS_GDCALL	38
2948 
2949 #define R_390_TLS_LDCALL	39
2950 
2951 #define R_390_TLS_GD32		40
2952 
2953 #define R_390_TLS_GD64		41
2954 
2955 #define R_390_TLS_GOTIE12	42
2956 
2957 #define R_390_TLS_GOTIE32	43
2958 
2959 #define R_390_TLS_GOTIE64	44
2960 
2961 #define R_390_TLS_LDM32		45
2962 
2963 #define R_390_TLS_LDM64		46
2964 
2965 #define R_390_TLS_IE32		47
2966 
2967 #define R_390_TLS_IE64		48
2968 
2969 #define R_390_TLS_IEENT		49
2970 
2971 #define R_390_TLS_LE32		50
2972 
2973 #define R_390_TLS_LE64		51
2974 
2975 #define R_390_TLS_LDO32		52
2976 
2977 #define R_390_TLS_LDO64		53
2978 
2979 #define R_390_TLS_DTPMOD	54
2980 #define R_390_TLS_DTPOFF	55
2981 #define R_390_TLS_TPOFF		56
2982 
2983 #define R_390_20		57
2984 #define R_390_GOT20		58
2985 #define R_390_GOTPLT20		59
2986 #define R_390_TLS_GOTIE20	60
2987 
2988 
2989 #define R_390_NUM		61
2990 
2991 
2992 
2993 #define R_CRIS_NONE		0
2994 #define R_CRIS_8		1
2995 #define R_CRIS_16		2
2996 #define R_CRIS_32		3
2997 #define R_CRIS_8_PCREL		4
2998 #define R_CRIS_16_PCREL		5
2999 #define R_CRIS_32_PCREL		6
3000 #define R_CRIS_GNU_VTINHERIT	7
3001 #define R_CRIS_GNU_VTENTRY	8
3002 #define R_CRIS_COPY		9
3003 #define R_CRIS_GLOB_DAT		10
3004 #define R_CRIS_JUMP_SLOT	11
3005 #define R_CRIS_RELATIVE		12
3006 #define R_CRIS_16_GOT		13
3007 #define R_CRIS_32_GOT		14
3008 #define R_CRIS_16_GOTPLT	15
3009 #define R_CRIS_32_GOTPLT	16
3010 #define R_CRIS_32_GOTREL	17
3011 #define R_CRIS_32_PLT_GOTREL	18
3012 #define R_CRIS_32_PLT_PCREL	19
3013 
3014 #define R_CRIS_NUM		20
3015 
3016 
3017 
3018 #define R_X86_64_NONE		0
3019 #define R_X86_64_64		1
3020 #define R_X86_64_PC32		2
3021 #define R_X86_64_GOT32		3
3022 #define R_X86_64_PLT32		4
3023 #define R_X86_64_COPY		5
3024 #define R_X86_64_GLOB_DAT	6
3025 #define R_X86_64_JUMP_SLOT	7
3026 #define R_X86_64_RELATIVE	8
3027 #define R_X86_64_GOTPCREL	9
3028 
3029 #define R_X86_64_32		10
3030 #define R_X86_64_32S		11
3031 #define R_X86_64_16		12
3032 #define R_X86_64_PC16		13
3033 #define R_X86_64_8		14
3034 #define R_X86_64_PC8		15
3035 #define R_X86_64_DTPMOD64	16
3036 #define R_X86_64_DTPOFF64	17
3037 #define R_X86_64_TPOFF64	18
3038 #define R_X86_64_TLSGD		19
3039 
3040 #define R_X86_64_TLSLD		20
3041 
3042 #define R_X86_64_DTPOFF32	21
3043 #define R_X86_64_GOTTPOFF	22
3044 
3045 #define R_X86_64_TPOFF32	23
3046 #define R_X86_64_PC64		24
3047 #define R_X86_64_GOTOFF64	25
3048 #define R_X86_64_GOTPC32	26
3049 #define R_X86_64_GOT64		27
3050 #define R_X86_64_GOTPCREL64	28
3051 #define R_X86_64_GOTPC64	29
3052 #define R_X86_64_GOTPLT64	30
3053 #define R_X86_64_PLTOFF64	31
3054 #define R_X86_64_SIZE32		32
3055 #define R_X86_64_SIZE64		33
3056 
3057 #define R_X86_64_GOTPC32_TLSDESC 34
3058 #define R_X86_64_TLSDESC_CALL   35
3059 
3060 #define R_X86_64_TLSDESC        36
3061 #define R_X86_64_IRELATIVE	37
3062 #define R_X86_64_RELATIVE64	38
3063 #define R_X86_64_GOTPCRELX	41
3064 #define R_X86_64_REX_GOTPCRELX	42
3065 #define R_X86_64_NUM		43
3066 
3067 
3068 
3069 #define R_MN10300_NONE		0
3070 #define R_MN10300_32		1
3071 #define R_MN10300_16		2
3072 #define R_MN10300_8		3
3073 #define R_MN10300_PCREL32	4
3074 #define R_MN10300_PCREL16	5
3075 #define R_MN10300_PCREL8	6
3076 #define R_MN10300_GNU_VTINHERIT	7
3077 #define R_MN10300_GNU_VTENTRY	8
3078 #define R_MN10300_24		9
3079 #define R_MN10300_GOTPC32	10
3080 #define R_MN10300_GOTPC16	11
3081 #define R_MN10300_GOTOFF32	12
3082 #define R_MN10300_GOTOFF24	13
3083 #define R_MN10300_GOTOFF16	14
3084 #define R_MN10300_PLT32		15
3085 #define R_MN10300_PLT16		16
3086 #define R_MN10300_GOT32		17
3087 #define R_MN10300_GOT24		18
3088 #define R_MN10300_GOT16		19
3089 #define R_MN10300_COPY		20
3090 #define R_MN10300_GLOB_DAT	21
3091 #define R_MN10300_JMP_SLOT	22
3092 #define R_MN10300_RELATIVE	23
3093 
3094 #define R_MN10300_NUM		24
3095 
3096 
3097 
3098 #define R_M32R_NONE		0
3099 #define R_M32R_16		1
3100 #define R_M32R_32		2
3101 #define R_M32R_24		3
3102 #define R_M32R_10_PCREL		4
3103 #define R_M32R_18_PCREL		5
3104 #define R_M32R_26_PCREL		6
3105 #define R_M32R_HI16_ULO		7
3106 #define R_M32R_HI16_SLO		8
3107 #define R_M32R_LO16		9
3108 #define R_M32R_SDA16		10
3109 #define R_M32R_GNU_VTINHERIT	11
3110 #define R_M32R_GNU_VTENTRY	12
3111 
3112 #define R_M32R_16_RELA		33
3113 #define R_M32R_32_RELA		34
3114 #define R_M32R_24_RELA		35
3115 #define R_M32R_10_PCREL_RELA	36
3116 #define R_M32R_18_PCREL_RELA	37
3117 #define R_M32R_26_PCREL_RELA	38
3118 #define R_M32R_HI16_ULO_RELA	39
3119 #define R_M32R_HI16_SLO_RELA	40
3120 #define R_M32R_LO16_RELA	41
3121 #define R_M32R_SDA16_RELA	42
3122 #define R_M32R_RELA_GNU_VTINHERIT	43
3123 #define R_M32R_RELA_GNU_VTENTRY	44
3124 #define R_M32R_REL32		45
3125 
3126 #define R_M32R_GOT24		48
3127 #define R_M32R_26_PLTREL	49
3128 #define R_M32R_COPY		50
3129 #define R_M32R_GLOB_DAT		51
3130 #define R_M32R_JMP_SLOT		52
3131 #define R_M32R_RELATIVE		53
3132 #define R_M32R_GOTOFF		54
3133 #define R_M32R_GOTPC24		55
3134 #define R_M32R_GOT16_HI_ULO	56
3135 
3136 #define R_M32R_GOT16_HI_SLO	57
3137 
3138 #define R_M32R_GOT16_LO		58
3139 #define R_M32R_GOTPC_HI_ULO	59
3140 
3141 #define R_M32R_GOTPC_HI_SLO	60
3142 
3143 #define R_M32R_GOTPC_LO		61
3144 
3145 #define R_M32R_GOTOFF_HI_ULO	62
3146 
3147 #define R_M32R_GOTOFF_HI_SLO	63
3148 
3149 #define R_M32R_GOTOFF_LO	64
3150 #define R_M32R_NUM		256
3151 
3152 #define R_MICROBLAZE_NONE 0
3153 #define R_MICROBLAZE_32 1
3154 #define R_MICROBLAZE_32_PCREL 2
3155 #define R_MICROBLAZE_64_PCREL 3
3156 #define R_MICROBLAZE_32_PCREL_LO 4
3157 #define R_MICROBLAZE_64 5
3158 #define R_MICROBLAZE_32_LO 6
3159 #define R_MICROBLAZE_SRO32 7
3160 #define R_MICROBLAZE_SRW32 8
3161 #define R_MICROBLAZE_64_NONE 9
3162 #define R_MICROBLAZE_32_SYM_OP_SYM 10
3163 #define R_MICROBLAZE_GNU_VTINHERIT 11
3164 #define R_MICROBLAZE_GNU_VTENTRY 12
3165 #define R_MICROBLAZE_GOTPC_64 13
3166 #define R_MICROBLAZE_GOT_64 14
3167 #define R_MICROBLAZE_PLT_64 15
3168 #define R_MICROBLAZE_REL 16
3169 #define R_MICROBLAZE_JUMP_SLOT 17
3170 #define R_MICROBLAZE_GLOB_DAT 18
3171 #define R_MICROBLAZE_GOTOFF_64 19
3172 #define R_MICROBLAZE_GOTOFF_32 20
3173 #define R_MICROBLAZE_COPY 21
3174 #define R_MICROBLAZE_TLS 22
3175 #define R_MICROBLAZE_TLSGD 23
3176 #define R_MICROBLAZE_TLSLD 24
3177 #define R_MICROBLAZE_TLSDTPMOD32 25
3178 #define R_MICROBLAZE_TLSDTPREL32 26
3179 #define R_MICROBLAZE_TLSDTPREL64 27
3180 #define R_MICROBLAZE_TLSGOTTPREL32 28
3181 #define R_MICROBLAZE_TLSTPREL32	 29
3182 
3183 #define DT_NIOS2_GP             0x70000002
3184 
3185 #define R_NIOS2_NONE		0
3186 #define R_NIOS2_S16		1
3187 #define R_NIOS2_U16		2
3188 #define R_NIOS2_PCREL16		3
3189 #define R_NIOS2_CALL26		4
3190 #define R_NIOS2_IMM5		5
3191 #define R_NIOS2_CACHE_OPX	6
3192 #define R_NIOS2_IMM6		7
3193 #define R_NIOS2_IMM8		8
3194 #define R_NIOS2_HI16		9
3195 #define R_NIOS2_LO16		10
3196 #define R_NIOS2_HIADJ16		11
3197 #define R_NIOS2_BFD_RELOC_32	12
3198 #define R_NIOS2_BFD_RELOC_16	13
3199 #define R_NIOS2_BFD_RELOC_8	14
3200 #define R_NIOS2_GPREL		15
3201 #define R_NIOS2_GNU_VTINHERIT	16
3202 #define R_NIOS2_GNU_VTENTRY	17
3203 #define R_NIOS2_UJMP		18
3204 #define R_NIOS2_CJMP		19
3205 #define R_NIOS2_CALLR		20
3206 #define R_NIOS2_ALIGN		21
3207 #define R_NIOS2_GOT16		22
3208 #define R_NIOS2_CALL16		23
3209 #define R_NIOS2_GOTOFF_LO	24
3210 #define R_NIOS2_GOTOFF_HA	25
3211 #define R_NIOS2_PCREL_LO	26
3212 #define R_NIOS2_PCREL_HA	27
3213 #define R_NIOS2_TLS_GD16	28
3214 #define R_NIOS2_TLS_LDM16	29
3215 #define R_NIOS2_TLS_LDO16	30
3216 #define R_NIOS2_TLS_IE16	31
3217 #define R_NIOS2_TLS_LE16	32
3218 #define R_NIOS2_TLS_DTPMOD	33
3219 #define R_NIOS2_TLS_DTPREL	34
3220 #define R_NIOS2_TLS_TPREL	35
3221 #define R_NIOS2_COPY		36
3222 #define R_NIOS2_GLOB_DAT	37
3223 #define R_NIOS2_JUMP_SLOT	38
3224 #define R_NIOS2_RELATIVE	39
3225 #define R_NIOS2_GOTOFF		40
3226 #define R_NIOS2_CALL26_NOAT	41
3227 #define R_NIOS2_GOT_LO		42
3228 #define R_NIOS2_GOT_HA		43
3229 #define R_NIOS2_CALL_LO		44
3230 #define R_NIOS2_CALL_HA		45
3231 
3232 #define R_OR1K_NONE		0
3233 #define R_OR1K_32		1
3234 #define R_OR1K_16		2
3235 #define R_OR1K_8		3
3236 #define R_OR1K_LO_16_IN_INSN	4
3237 #define R_OR1K_HI_16_IN_INSN	5
3238 #define R_OR1K_INSN_REL_26	6
3239 #define R_OR1K_GNU_VTENTRY	7
3240 #define R_OR1K_GNU_VTINHERIT	8
3241 #define R_OR1K_32_PCREL		9
3242 #define R_OR1K_16_PCREL		10
3243 #define R_OR1K_8_PCREL		11
3244 #define R_OR1K_GOTPC_HI16	12
3245 #define R_OR1K_GOTPC_LO16	13
3246 #define R_OR1K_GOT16		14
3247 #define R_OR1K_PLT26		15
3248 #define R_OR1K_GOTOFF_HI16	16
3249 #define R_OR1K_GOTOFF_LO16	17
3250 #define R_OR1K_COPY		18
3251 #define R_OR1K_GLOB_DAT		19
3252 #define R_OR1K_JMP_SLOT		20
3253 #define R_OR1K_RELATIVE		21
3254 #define R_OR1K_TLS_GD_HI16	22
3255 #define R_OR1K_TLS_GD_LO16	23
3256 #define R_OR1K_TLS_LDM_HI16	24
3257 #define R_OR1K_TLS_LDM_LO16	25
3258 #define R_OR1K_TLS_LDO_HI16	26
3259 #define R_OR1K_TLS_LDO_LO16	27
3260 #define R_OR1K_TLS_IE_HI16	28
3261 #define R_OR1K_TLS_IE_LO16	29
3262 #define R_OR1K_TLS_LE_HI16	30
3263 #define R_OR1K_TLS_LE_LO16	31
3264 #define R_OR1K_TLS_TPOFF	32
3265 #define R_OR1K_TLS_DTPOFF	33
3266 #define R_OR1K_TLS_DTPMOD	34
3267 
3268 #define R_BPF_NONE		0
3269 #define R_BPF_MAP_FD		1
3270 
3271 #define R_RISCV_NONE            0
3272 #define R_RISCV_32              1
3273 #define R_RISCV_64              2
3274 #define R_RISCV_RELATIVE        3
3275 #define R_RISCV_COPY            4
3276 #define R_RISCV_JUMP_SLOT       5
3277 #define R_RISCV_TLS_DTPMOD32    6
3278 #define R_RISCV_TLS_DTPMOD64    7
3279 #define R_RISCV_TLS_DTPREL32    8
3280 #define R_RISCV_TLS_DTPREL64    9
3281 #define R_RISCV_TLS_TPREL32     10
3282 #define R_RISCV_TLS_TPREL64     11
3283 #define R_RISCV_TLSDESC         12
3284 
3285 #define R_RISCV_BRANCH          16
3286 #define R_RISCV_JAL             17
3287 #define R_RISCV_CALL            18
3288 #define R_RISCV_CALL_PLT        19
3289 #define R_RISCV_GOT_HI20        20
3290 #define R_RISCV_TLS_GOT_HI20    21
3291 #define R_RISCV_TLS_GD_HI20     22
3292 #define R_RISCV_PCREL_HI20      23
3293 #define R_RISCV_PCREL_LO12_I    24
3294 #define R_RISCV_PCREL_LO12_S    25
3295 #define R_RISCV_HI20            26
3296 #define R_RISCV_LO12_I          27
3297 #define R_RISCV_LO12_S          28
3298 #define R_RISCV_TPREL_HI20      29
3299 #define R_RISCV_TPREL_LO12_I    30
3300 #define R_RISCV_TPREL_LO12_S    31
3301 #define R_RISCV_TPREL_ADD       32
3302 #define R_RISCV_ADD8            33
3303 #define R_RISCV_ADD16           34
3304 #define R_RISCV_ADD32           35
3305 #define R_RISCV_ADD64           36
3306 #define R_RISCV_SUB8            37
3307 #define R_RISCV_SUB16           38
3308 #define R_RISCV_SUB32           39
3309 #define R_RISCV_SUB64           40
3310 #define R_RISCV_GOT32_PCREL     41
3311 #define R_RISCV_ALIGN           43
3312 #define R_RISCV_RVC_BRANCH      44
3313 #define R_RISCV_RVC_JUMP        45
3314 #define R_RISCV_RVC_LUI         46
3315 #define R_RISCV_RELAX           51
3316 #define R_RISCV_SUB6            52
3317 #define R_RISCV_SET6            53
3318 #define R_RISCV_SET8            54
3319 #define R_RISCV_SET16           55
3320 #define R_RISCV_SET32           56
3321 #define R_RISCV_32_PCREL        57
3322 #define R_RISCV_IRELATIVE       58
3323 #define R_RISCV_PLT32           59
3324 #define R_RISCV_SET_ULEB128     60
3325 #define R_RISCV_SUB_ULEB128     61
3326 #define R_RISCV_TLSDESC_HI20    62
3327 #define R_RISCV_TLSDESC_LOAD_LO12 63
3328 #define R_RISCV_TLSDESC_ADD_LO12  64
3329 #define R_RISCV_TLSDESC_CALL    65
3330 
3331 #define EF_LARCH_ABI_MODIFIER_MASK    0x07
3332 #define EF_LARCH_ABI_SOFT_FLOAT       0x01
3333 #define EF_LARCH_ABI_SINGLE_FLOAT     0x02
3334 #define EF_LARCH_ABI_DOUBLE_FLOAT     0x03
3335 #define EF_LARCH_OBJABI_V1            0x40
3336 
3337 #define R_LARCH_NONE                        0
3338 #define R_LARCH_32                          1
3339 #define R_LARCH_64                          2
3340 #define R_LARCH_RELATIVE                    3
3341 #define R_LARCH_COPY                        4
3342 #define R_LARCH_JUMP_SLOT                   5
3343 #define R_LARCH_TLS_DTPMOD32                6
3344 #define R_LARCH_TLS_DTPMOD64                7
3345 #define R_LARCH_TLS_DTPREL32                8
3346 #define R_LARCH_TLS_DTPREL64                9
3347 #define R_LARCH_TLS_TPREL32                 10
3348 #define R_LARCH_TLS_TPREL64                 11
3349 #define R_LARCH_IRELATIVE                   12
3350 #define R_LARCH_MARK_LA                     20
3351 #define R_LARCH_MARK_PCREL                  21
3352 #define R_LARCH_SOP_PUSH_PCREL              22
3353 #define R_LARCH_SOP_PUSH_ABSOLUTE           23
3354 #define R_LARCH_SOP_PUSH_DUP                24
3355 #define R_LARCH_SOP_PUSH_GPREL              25
3356 #define R_LARCH_SOP_PUSH_TLS_TPREL          26
3357 #define R_LARCH_SOP_PUSH_TLS_GOT            27
3358 #define R_LARCH_SOP_PUSH_TLS_GD             28
3359 #define R_LARCH_SOP_PUSH_PLT_PCREL          29
3360 #define R_LARCH_SOP_ASSERT                  30
3361 #define R_LARCH_SOP_NOT                     31
3362 #define R_LARCH_SOP_SUB                     32
3363 #define R_LARCH_SOP_SL                      33
3364 #define R_LARCH_SOP_SR                      34
3365 #define R_LARCH_SOP_ADD                     35
3366 #define R_LARCH_SOP_AND                     36
3367 #define R_LARCH_SOP_IF_ELSE                 37
3368 #define R_LARCH_SOP_POP_32_S_10_5           38
3369 #define R_LARCH_SOP_POP_32_U_10_12          39
3370 #define R_LARCH_SOP_POP_32_S_10_12          40
3371 #define R_LARCH_SOP_POP_32_S_10_16          41
3372 #define R_LARCH_SOP_POP_32_S_10_16_S2       42
3373 #define R_LARCH_SOP_POP_32_S_5_20           43
3374 #define R_LARCH_SOP_POP_32_S_0_5_10_16_S2   44
3375 #define R_LARCH_SOP_POP_32_S_0_10_10_16_S2  45
3376 #define R_LARCH_SOP_POP_32_U                46
3377 #define R_LARCH_ADD8                        47
3378 #define R_LARCH_ADD16                       48
3379 #define R_LARCH_ADD24                       49
3380 #define R_LARCH_ADD32                       50
3381 #define R_LARCH_ADD64                       51
3382 #define R_LARCH_SUB8                        52
3383 #define R_LARCH_SUB16                       53
3384 #define R_LARCH_SUB24                       54
3385 #define R_LARCH_SUB32                       55
3386 #define R_LARCH_SUB64                       56
3387 #define R_LARCH_GNU_VTINHERIT               57
3388 #define R_LARCH_GNU_VTENTRY                 58
3389 #define R_LARCH_B16                         64
3390 #define R_LARCH_B21                         65
3391 #define R_LARCH_B26                         66
3392 #define R_LARCH_ABS_HI20                    67
3393 #define R_LARCH_ABS_LO12                    68
3394 #define R_LARCH_ABS64_LO20                  69
3395 #define R_LARCH_ABS64_HI12                  70
3396 #define R_LARCH_PCALA_HI20                  71
3397 #define R_LARCH_PCALA_LO12                  72
3398 #define R_LARCH_PCALA64_LO20                73
3399 #define R_LARCH_PCALA64_HI12                74
3400 #define R_LARCH_GOT_PC_HI20                 75
3401 #define R_LARCH_GOT_PC_LO12                 76
3402 #define R_LARCH_GOT64_PC_LO20               77
3403 #define R_LARCH_GOT64_PC_HI12               78
3404 #define R_LARCH_GOT_HI20                    79
3405 #define R_LARCH_GOT_LO12                    80
3406 #define R_LARCH_GOT64_LO20                  81
3407 #define R_LARCH_GOT64_HI12                  82
3408 #define R_LARCH_TLS_LE_HI20                 83
3409 #define R_LARCH_TLS_LE_LO12                 84
3410 #define R_LARCH_TLS_LE64_LO20               85
3411 #define R_LARCH_TLS_LE64_HI12               86
3412 #define R_LARCH_TLS_IE_PC_HI20              87
3413 #define R_LARCH_TLS_IE_PC_LO12              88
3414 #define R_LARCH_TLS_IE64_PC_LO20            89
3415 #define R_LARCH_TLS_IE64_PC_HI12            90
3416 #define R_LARCH_TLS_IE_HI20                 91
3417 #define R_LARCH_TLS_IE_LO12                 92
3418 #define R_LARCH_TLS_IE64_LO20               93
3419 #define R_LARCH_TLS_IE64_HI12               94
3420 #define R_LARCH_TLS_LD_PC_HI20              95
3421 #define R_LARCH_TLS_LD_HI20                 96
3422 #define R_LARCH_TLS_GD_PC_HI20              97
3423 #define R_LARCH_TLS_GD_HI20                 98
3424 #define R_LARCH_32_PCREL                    99
3425 #define R_LARCH_RELAX                       100
3426 
3427 #ifdef __cplusplus
3428 }
3429 #endif
3430 
3431 
3432 #endif
3433