6 typedef uint32_t Elf32_Addr;
7 typedef uint32_t Elf32_Off;
8 typedef uint16_t Elf32_Half;
9 typedef uint32_t Elf32_Word;
10 typedef int32_t Elf32_Sword;
12 typedef uint64_t Elf64_Addr;
13 typedef uint64_t Elf64_Off;
14 typedef uint16_t Elf64_Half;
15 typedef uint32_t Elf64_Word;
16 typedef int32_t Elf64_Sword;
17 typedef uint64_t Elf64_Xword;
18 typedef int64_t Elf64_Sxword;
23 unsigned char e_ident[EI_NIDENT];
32 Elf32_Half e_phentsize;
34 Elf32_Half e_shentsize;
36 Elf32_Half e_shstrndx;
40 unsigned char e_ident[EI_NIDENT];
49 Elf64_Half e_phentsize;
51 Elf64_Half e_shentsize;
53 Elf64_Half e_shstrndx;
66 Elf32_Word sh_addralign;
67 Elf32_Word sh_entsize;
79 Elf64_Xword sh_addralign;
80 Elf64_Xword sh_entsize;
86 Elf32_Word ch_addralign;
91 Elf64_Word ch_reserved;
93 Elf64_Xword ch_addralign;
100 unsigned char st_info;
101 unsigned char st_other;
107 unsigned char st_info;
108 unsigned char st_other;
123 Elf32_Sword r_addend;
134 Elf64_Sxword r_addend;
145 /* extern Elf32_Dyn _DYNAMIC[]; */
155 /* extern Elf64_Dyn _DYNAMIC[]; */
159 #define DT_PLTRELSZ 2
173 #define DT_SYMBOLIC 16
179 #define DT_TEXTREL 22
181 #define DT_BIND_NOW 24
182 #define DT_INIT_ARRAY 25
183 #define DT_FINI_ARRAY 26
184 #define DT_INIT_ARRAYSZ 27
185 #define DT_FINI_ARRAYSZ 28
186 #define DT_RUNPATH 29
188 #define DT_ENCODING 32
189 #define DT_PREINIT_ARRAY 32
190 #define DT_PREINIT_ARRAYSZ 33
191 #define DT_SYMTAB_SHNDX 34
192 #define DT_LOOS 0x6000000D
193 #define DT_HIOS 0x6ffff000
194 #define DT_LOPROC 0x70000000
195 #define DT_HIPROC 0x7fffffff
197 #define DF_ORIGIN 0x1
198 #define DF_SYMBOLIC 0x2
199 #define DF_TEXTREL 0x4
200 #define DF_BIND_NOW 0x8
201 #define DF_STATIC_TLS 0x10
203 #define ELF32_R_SYM(i) ((i)>>8)
204 #define ELF32_R_TYPE(i) ((unsigned char)(i))
205 #define ELF32_R_INFO(s,t) (((s)<<8)+(unsigned char)(t))
207 #define ELF64_R_SYM(i) ((i)>>32)
208 #define ELF64_R_TYPE(i) ((i)&0xffffffffL)
209 #define ELF64_R_INFO(s,t) (((s)<<32)+((t)&0xffffffffL))
211 #define ELF32_ST_BIND(i) ((i)>>4)
212 #define ELF32_ST_TYPE(i) ((i)&0xf)
213 #define ELF32_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
215 #define ELF64_ST_BIND(i) ((i)>>4)
216 #define ELF64_ST_TYPE(i) ((i)&0xf)
217 #define ELF64_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
219 #define ELF32_ST_VISIBILITY(o) ((o)&0x3)
220 #define ELF64_ST_VISIBILITY(o) ((o)&0x3)
226 #define STB_LOPROC 13
227 #define STB_HIPROC 15
232 #define STT_SECTION 3
238 #define STT_LOPROC 13
239 #define STT_HIPROC 15
241 #define STV_DEFAULT 0
242 #define STV_INTERNAL 1
244 #define STV_PROTECTED 3
246 #define GRP_COMDAT 0x1
247 #define GRP_MASKOS 0x0ff00000
248 #define GRP_MASKPROC 0xf0000000
250 #define ELFCOMPRESS_ZLIB 1
251 #define ELFCOMPRESS_LOOS 0x60000000
252 #define ELFCOMPRESS_HIOS 0x6fffffff
253 #define ELFCOMPRESS_LOPROC 0x70000000
254 #define ELFCOMPRESS_HIPROC 0x7fffffff
257 #define SHT_PROGBITS 1
262 #define SHT_DYNAMIC 6
267 #define SHT_DYNSYM 11
268 #define SHT_INIT_ARRAY 14
269 #define SHT_FINI_ARRAY 15
270 #define SHT_PREINIT_ARRAY 16
272 #define SHT_SYMTAB_SHNDX 18
273 #define SHT_LOOS 0x60000000
274 #define SHT_HIOS 0x6fffffff
275 #define SHT_LOPROC 0x70000000
276 #define SHT_HIPROC 0x7fffffff
277 #define SHT_LOUSER 0x80000000
278 #define SHT_HIUSER 0xffffffff
280 #define SHF_WRITE 0x1
281 #define SHF_ALLOC 0x2
282 #define SHF_EXECINSTR 0x4
283 #define SHF_MERGE 0x10
284 #define SHF_STRINGS 0x20
285 #define SHF_INFO_LINK 0x40
286 #define SHF_LINK_ORDER 0x80
287 #define SHF_OS_NONCONFORMING 0x100
288 #define SHF_GROUP 0x200
289 #define SHF_TLS 0x400
290 #define SHF_COMPRESSED 0x800
291 #define SHF_MASKOS 0x0ff00000
292 #define SHF_MASKPROC 0xf0000000
295 #define SHN_LORESERVE 0xff00
296 #define SHN_LOPROC 0xff00
297 #define SHN_HIPROC 0xff1f
298 #define SHN_LOOS 0xff20
299 #define SHN_HIOS 0xff3f
300 #define SHN_ABS 0xfff1
301 #define SHN_COMMON 0xfff2
302 #define SHN_XINDEX 0xffff
303 #define SHN_HIRESERVE 0xffff
310 #define ET_LOOS 0xfe00
311 #define ET_HIOS 0xfeff
312 #define ET_LOPROC 0xff00
313 #define ET_HIPROC 0xffff
325 #define EM_MIPS_RS3_LE 10
328 #define EM_SPARC32PLUS 18
341 #define EM_SPARCV9 43
342 #define EM_TRICORE 44
345 #define EM_H8_300H 47
350 #define EM_COLDFIRE 52
356 #define EM_STARCORE 58
365 #define EM_ST9PLUS 67
375 #define EM_JAVELIN 77
376 #define EM_FIREPATH 78
387 #define EM_MN10300 89
388 #define EM_MN10200 90
390 #define EM_OPENRISC 92
391 #define EM_ARC_COMPACT 93
393 #define EM_VIDEOCORE 95
394 #define EM_TMM_GPP 96
402 #define EM_F2MC16 104
403 #define EM_MSP430 105
404 #define EM_BLACKFIN 106
405 #define EM_SE_C33 107
408 #define EM_UNICORE 110
409 #define EM_EXCESS 111
411 #define EM_ALTERA_NIOS2 113
416 #define EM_DSPIC30F 118
419 #define EM_TSK3000 131
423 #define EM_SCORE7 135
425 #define EM_VIDEOCORE3 137
426 #define EM_LATTICEMICO32 138
427 #define EM_SE_C17 139
428 #define EM_TI_C6000 140
429 #define EM_TI_C2000 141
430 #define EM_TI_C5500 142
431 #define EM_TI_ARP32 143
432 #define EM_TI_PRU 144
433 #define EM_MMDSP_PLUS 160
434 #define EM_MMDSP_PLUS 160
435 #define EM_CYPRESS_M8C 161
437 #define EM_TRIMEDIA 163
440 #define EM_STXP7X 166
443 #define EM_ECOG1X 168
444 #define EM_MAXQ30 169
445 #define EM_XIMO16 170
447 #define EM_CRAYNV2 172
450 #define EM_MCST_ELBRUS 175
451 #define EM_ECOG16 176
457 #define EM_AARCH64 183
460 #define EM_TILE64 187
461 #define EM_TILEPRO 188
462 #define EM_MICROBLAZE 189
464 #define EM_TILEGX 191
465 #define EM_CLOUDSHIELD 192
466 #define EM_COREA_1ST 193
467 #define EM_COREA_2ND 194
468 #define EM_ARC_COMPACT2 195
471 #define EM_VIDEOCORE5 198
473 #define EM_56800EX 200
477 #define EM_MCHP_PIC 204
478 #define EM_INTEL205 205
479 #define EM_INTEL206 206
480 #define EM_INTEL207 207
481 #define EM_INTEL208 208
482 #define EM_INTEL209 209
492 #define EM_CSR_KALIMBA 219
494 #define EM_VISIUM 221
497 #define EM_AMDGPU 224
511 #define EI_ABIVERSION 8
520 #define ELFCLASSNONE 0
524 #define ELFDATANONE 0
525 #define ELFDATA2LSB 1
526 #define ELFDATA2MSB 2
528 #define ELFOSABI_NONE 0
529 #define ELFOSABI_HPUX 1
530 #define ELFOSABI_NETBSD 2
531 #define ELFOSABI_GNU 3
532 #define ELFOSABI_LINUX 3
533 #define ELFOSABI_SOLARIS 6
534 #define ELFOSABI_AIX 7
535 #define ELFOSABI_IRIX 8
536 #define ELFOSABI_FREEBSD 9
537 #define ELFOSABI_TRU64 10
538 #define ELFOSABI_MODESTO 11
539 #define ELFOSABI_OPENBSD 12
540 #define ELFOSABI_OPENVMS 13
541 #define ELFOSABI_NSK 14
542 #define ELFOSABI_AROS 15
543 #define ELFOSABI_FENIXOS 16
544 #define ELFOSABI_CLOUDABI 17
545 #define ELFOSABI_OPENVOS 18