exec_elf.h Source File
Back to the index.
src
include
thirdparty
exec_elf.h
Go to the documentation of this file.
1
/* gxemul: $Id: exec_elf.h,v 1.7 2007-07-20 09:03:33 debug Exp $ */
2
3
#ifndef __EXEC_ELF_H
4
#define __EXEC_ELF_H
5
6
#include <inttypes.h>
7
8
/* $NetBSD: exec_elf.h,v 1.37.4.2 2001/05/01 12:05:43 he Exp $ */
9
/* With updates from $NetBSD: exec_elf.h,v 1.160 2018/05/24 17:05:18 christos Exp $ */
10
11
/*-
12
* Copyright (c) 1994 The NetBSD Foundation, Inc.
13
* All rights reserved.
14
*
15
* This code is derived from software contributed to The NetBSD Foundation
16
* by Christos Zoulas.
17
*
18
* Redistribution and use in source and binary forms, with or without
19
* modification, are permitted provided that the following conditions
20
* are met:
21
* 1. Redistributions of source code must retain the above copyright
22
* notice, this list of conditions and the following disclaimer.
23
* 2. Redistributions in binary form must reproduce the above copyright
24
* notice, this list of conditions and the following disclaimer in the
25
* documentation and/or other materials provided with the distribution.
26
* 3. All advertising materials mentioning features or use of this software
27
* must display the following acknowledgement:
28
* This product includes software developed by the NetBSD
29
* Foundation, Inc. and its contributors.
30
* 4. Neither the name of The NetBSD Foundation nor the names of its
31
* contributors may be used to endorse or promote products derived
32
* from this software without specific prior written permission.
33
*
34
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
35
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
36
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
37
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
38
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44
* POSSIBILITY OF SUCH DAMAGE.
45
*/
46
47
48
typedef
uint8_t
Elf_Byte
;
49
50
typedef
uint32_t
Elf32_Addr
;
51
#define ELF32_FSZ_ADDR 4
52
typedef
uint32_t
Elf32_Off
;
53
#define ELF32_FSZ_OFF 4
54
typedef
int32_t
Elf32_Sword
;
55
#define ELF32_FSZ_SWORD 4
56
typedef
uint32_t
Elf32_Word
;
57
#define ELF32_FSZ_WORD 4
58
typedef
uint16_t
Elf32_Half
;
59
#define ELF32_FSZ_HALF 2
60
61
typedef
uint64_t
Elf64_Addr
;
62
#define ELF64_FSZ_ADDR 8
63
typedef
uint64_t
Elf64_Off
;
64
#define ELF64_FSZ_OFF 8
65
typedef
int32_t
Elf64_Shalf
;
66
#define ELF64_FSZ_SHALF 4
67
#ifdef __sparc_v9__
68
/* #error weird */
69
typedef
int32_t
Elf64_Sword
;
70
#define ELF64_FSZ_SWORD 4
71
typedef
uint32_t
Elf64_Word
;
72
#define ELF64_FSZ_WORD 4
73
#else
74
typedef
int64_t
Elf64_Sword
;
75
#define ELF64_FSZ_SWORD 8
76
typedef
uint64_t
Elf64_Word
;
77
#define ELF64_FSZ_WORD 8
78
#endif
79
typedef
int64_t
Elf64_Sxword
;
80
#define ELF64_FSZ_XWORD 8
81
typedef
uint64_t
Elf64_Xword
;
82
#define ELF64_FSZ_XWORD 8
83
typedef
uint32_t
Elf64_Half
;
84
#define ELF64_FSZ_HALF 4
85
typedef
uint16_t
Elf64_Quarter
;
86
#define ELF64_FSZ_QUARTER 2
87
88
/*
89
* ELF Header
90
*/
91
#define ELF_NIDENT 16
92
93
typedef
struct
{
94
unsigned
char
e_ident[
ELF_NIDENT
];
/* Id bytes */
95
Elf32_Half
e_type
;
/* file type */
96
Elf32_Half
e_machine
;
/* machine type */
97
Elf32_Word
e_version
;
/* version number */
98
Elf32_Addr
e_entry
;
/* entry point */
99
Elf32_Off
e_phoff
;
/* Program hdr offset */
100
Elf32_Off
e_shoff
;
/* Section hdr offset */
101
Elf32_Word
e_flags
;
/* Processor flags */
102
Elf32_Half
e_ehsize
;
/* sizeof ehdr */
103
Elf32_Half
e_phentsize
;
/* Program header entry size */
104
Elf32_Half
e_phnum
;
/* Number of program headers */
105
Elf32_Half
e_shentsize
;
/* Section header entry size */
106
Elf32_Half
e_shnum
;
/* Number of section headers */
107
Elf32_Half
e_shstrndx
;
/* String table index */
108
}
Elf32_Ehdr
;
109
110
typedef
struct
{
111
unsigned
char
e_ident[
ELF_NIDENT
];
/* Id bytes */
112
Elf64_Quarter
e_type
;
/* file type */
113
Elf64_Quarter
e_machine
;
/* machine type */
114
Elf64_Half
e_version
;
/* version number */
115
Elf64_Addr
e_entry
;
/* entry point */
116
Elf64_Off
e_phoff
;
/* Program hdr offset */
117
Elf64_Off
e_shoff
;
/* Section hdr offset */
118
Elf64_Half
e_flags
;
/* Processor flags */
119
Elf64_Quarter
e_ehsize
;
/* sizeof ehdr */
120
Elf64_Quarter
e_phentsize
;
/* Program header entry size */
121
Elf64_Quarter
e_phnum
;
/* Number of program headers */
122
Elf64_Quarter
e_shentsize
;
/* Section header entry size */
123
Elf64_Quarter
e_shnum
;
/* Number of section headers */
124
Elf64_Quarter
e_shstrndx
;
/* String table index */
125
}
Elf64_Ehdr
;
126
127
/* e_ident offsets */
128
#define EI_MAG0 0
/* '\177' */
129
#define EI_MAG1 1
/* 'E' */
130
#define EI_MAG2 2
/* 'L' */
131
#define EI_MAG3 3
/* 'F' */
132
#define EI_CLASS 4
/* File class */
133
#define EI_DATA 5
/* Data encoding */
134
#define EI_VERSION 6
/* File version */
135
#define EI_OSABI 7
/* Operating system/ABI identification */
136
#define EI_ABIVERSION 8
/* ABI version */
137
#define EI_PAD 9
/* Start of padding bytes up to EI_NIDENT*/
138
139
/* e_ident[ELFMAG0,ELFMAG3] */
140
#define ELFMAG0 0x7f
141
#define ELFMAG1 'E'
142
#define ELFMAG2 'L'
143
#define ELFMAG3 'F'
144
#define ELFMAG "\177ELF"
145
#define SELFMAG 4
146
147
/* e_ident[EI_CLASS] */
148
#define ELFCLASSNONE 0
/* Invalid class */
149
#define ELFCLASS32 1
/* 32-bit objects */
150
#define ELFCLASS64 2
/* 64-bit objects */
151
#define ELFCLASSNUM 3
152
153
/* e_ident[EI_DATA] */
154
#define ELFDATANONE 0
/* Invalid data encoding */
155
#define ELFDATA2LSB 1
/* 2's complement values, LSB first */
156
#define ELFDATA2MSB 2
/* 2's complement values, MSB first */
157
158
/* e_ident[EI_VERSION] */
159
#define EV_NONE 0
/* Invalid version */
160
#define EV_CURRENT 1
/* Current version */
161
#define EV_NUM 2
162
163
/* e_ident[EI_OSABI] */
164
#define ELFOSABI_SYSV 0
/* UNIX System V ABI */
165
#define ELFOSABI_HPUX 1
/* HP-UX operating system */
166
#define ELFOSABI_NETBSD 2
/* NetBSD */
167
#define ELFOSABI_LINUX 3
/* GNU/Linux */
168
#define ELFOSABI_HURD 4
/* GNU/Hurd */
169
#define ELFOSABI_86OPEN 5
/* 86Open */
170
#define ELFOSABI_SOLARIS 6
/* Solaris */
171
#define ELFOSABI_MONTEREY 7
/* Monterey */
172
#define ELFOSABI_IRIX 8
/* IRIX */
173
#define ELFOSABI_FREEBSD 9
/* FreeBSD */
174
#define ELFOSABI_TRU64 10
/* TRU64 UNIX */
175
#define ELFOSABI_MODESTO 11
/* Novell Modesto */
176
#define ELFOSABI_OPENBSD 12
/* OpenBSD */
177
#define ELFOSABI_OPENVMS 13
/* OpenVMS */
178
#define ELFOSABI_NSK 14
/* HP Non-Stop Kernel */
179
#define ELFOSABI_AROS 15
/* Amiga Research OS */
180
/* Unofficial OSABIs follow */
181
#define ELFOSABI_ARM 97
/* ARM */
182
#define ELFOSABI_STANDALONE 255
/* Standalone (embedded) application */
183
184
#define ELFOSABI_NONE ELFOSABI_SYSV
185
#define ELFOSABI_AIX ELFOSABI_MONTEREY
186
187
/* e_type */
188
#define ET_NONE 0
/* No file type */
189
#define ET_REL 1
/* Relocatable file */
190
#define ET_EXEC 2
/* Executable file */
191
#define ET_DYN 3
/* Shared object file */
192
#define ET_CORE 4
/* Core file */
193
#define ET_NUM 5
194
195
#define ET_LOOS 0xfe00
/* Operating system specific range */
196
#define ET_HIOS 0xfeff
197
#define ET_LOPROC 0xff00
/* Processor-specific range */
198
#define ET_HIPROC 0xffff
199
200
/* e_machine */
201
#define EM_NONE 0
/* No machine */
202
#define EM_M32 1
/* AT&T WE 32100 */
203
#define EM_SPARC 2
/* SPARC */
204
#define EM_386 3
/* Intel 80386 */
205
#define EM_68K 4
/* Motorola 68000 */
206
#define EM_88K 5
/* Motorola 88000 */
207
#define EM_486 6
/* Intel 80486 [old] */
208
#define EM_IAMCU 6
/* Intel MCU. */
209
#define EM_860 7
/* Intel 80860 */
210
#define EM_MIPS 8
/* MIPS I Architecture */
211
#define EM_S370 9
/* Amdahl UTS on System/370 */
212
#define EM_MIPS_RS3_LE 10
/* MIPS RS3000 Little-endian */
213
/* 11-14 - Reserved */
214
#define EM_RS6000 11
/* IBM RS/6000 XXX reserved */
215
#define EM_PARISC 15
/* Hewlett-Packard PA-RISC */
216
#define EM_NCUBE 16
/* NCube XXX reserved */
217
#define EM_VPP500 17
/* Fujitsu VPP500 */
218
#define EM_SPARC32PLUS 18
/* Enhanced instruction set SPARC */
219
#define EM_960 19
/* Intel 80960 */
220
#define EM_PPC 20
/* PowerPC */
221
#define EM_PPC64 21
/* 64-bit PowerPC */
222
/* 22-35 - Reserved */
223
#define EM_S390 22
/* System/390 XXX reserved */
224
#define EM_V800 36
/* NEC V800 */
225
#define EM_FR20 37
/* Fujitsu FR20 */
226
#define EM_RH32 38
/* TRW RH-32 */
227
#define EM_RCE 39
/* Motorola RCE */
228
#define EM_ARM 40
/* Advanced RISC Machines ARM */
229
#define EM_ALPHA 41
/* DIGITAL Alpha */
230
#define EM_SH 42
/* Hitachi Super-H */
231
#define EM_SPARCV9 43
/* SPARC Version 9 */
232
#define EM_TRICORE 44
/* Siemens Tricore */
233
#define EM_ARC 45
/* Argonaut RISC Core */
234
#define EM_H8_300 46
/* Hitachi H8/300 */
235
#define EM_H8_300H 47
/* Hitachi H8/300H */
236
#define EM_H8S 48
/* Hitachi H8S */
237
#define EM_H8_500 49
/* Hitachi H8/500 */
238
#define EM_IA_64 50
/* Intel Merced Processor */
239
#define EM_MIPS_X 51
/* Stanford MIPS-X */
240
#define EM_COLDFIRE 52
/* Motorola Coldfire */
241
#define EM_68HC12 53
/* Motorola MC68HC12 */
242
#define EM_MMA 54
/* Fujitsu MMA Multimedia Accelerator */
243
#define EM_PCP 55
/* Siemens PCP */
244
#define EM_NCPU 56
/* Sony nCPU embedded RISC processor */
245
#define EM_NDR1 57
/* Denso NDR1 microprocessor */
246
#define EM_STARCORE 58
/* Motorola Star*Core processor */
247
#define EM_ME16 59
/* Toyota ME16 processor */
248
#define EM_ST100 60
/* STMicroelectronics ST100 processor */
249
#define EM_TINYJ 61
/* Advanced Logic Corp. TinyJ embedded family processor */
250
#define EM_X86_64 62
/* AMD x86-64 architecture */
251
#define EM_PDSP 63
/* Sony DSP Processor */
252
#define EM_PDP10 64
/* Digital Equipment Corp. PDP-10 */
253
#define EM_PDP11 65
/* Digital Equipment Corp. PDP-11 */
254
#define EM_FX66 66
/* Siemens FX66 microcontroller */
255
#define EM_ST9PLUS 67
/* STMicroelectronics ST9+ 8/16 bit microcontroller */
256
#define EM_ST7 68
/* STMicroelectronics ST7 8-bit microcontroller */
257
#define EM_68HC16 69
/* Motorola MC68HC16 Microcontroller */
258
#define EM_68HC11 70
/* Motorola MC68HC11 Microcontroller */
259
#define EM_68HC08 71
/* Motorola MC68HC08 Microcontroller */
260
#define EM_68HC05 72
/* Motorola MC68HC05 Microcontroller */
261
#define EM_SVX 73
/* Silicon Graphics SVx */
262
#define EM_ST19 74
/* STMicroelectronics ST19 8-bit CPU */
263
#define EM_VAX 75
/* Digital VAX */
264
#define EM_CRIS 76
/* Axis Communications 32-bit embedded processor */
265
#define EM_JAVELIN 77
/* Infineon Technologies 32-bit embedded CPU */
266
#define EM_FIREPATH 78
/* Element 14 64-bit DSP processor */
267
#define EM_ZSP 79
/* LSI Logic's 16-bit DSP processor */
268
#define EM_MMIX 80
/* Donald Knuth's educational 64-bit processor */
269
#define EM_HUANY 81
/* Harvard's machine-independent format */
270
#define EM_PRISM 82
/* SiTera Prism */
271
#define EM_AVR 83
/* Atmel AVR 8-bit microcontroller */
272
#define EM_FR30 84
/* Fujitsu FR30 */
273
#define EM_D10V 85
/* Mitsubishi D10V */
274
#define EM_D30V 86
/* Mitsubishi D30V */
275
#define EM_V850 87
/* NEC v850 */
276
#define EM_M32R 88
/* Mitsubishi M32R */
277
#define EM_MN10300 89
/* Matsushita MN10300 */
278
#define EM_MN10200 90
/* Matsushita MN10200 */
279
#define EM_PJ 91
/* picoJava */
280
#define EM_OR1K 92
/* OpenRISC 32-bit embedded processor */
281
#define EM_OPENRISC EM_OR1K
282
#define EM_ARC_A5 93
/* ARC Cores Tangent-A5 */
283
#define EM_XTENSA 94
/* Tensilica Xtensa Architecture */
284
#define EM_VIDEOCORE 95
/* Alphamosaic VideoCore processor */
285
#define EM_TMM_GPP 96
/* Thompson Multimedia General Purpose Processor */
286
#define EM_NS32K 97
/* National Semiconductor 32000 series */
287
#define EM_TPC 98
/* Tenor Network TPC processor */
288
#define EM_SNP1K 99
/* Trebia SNP 1000 processor */
289
#define EM_ST200 100
/* STMicroelectronics ST200 microcontroller */
290
#define EM_IP2K 101
/* Ubicom IP2xxx microcontroller family */
291
#define EM_MAX 102
/* MAX processor */
292
#define EM_CR 103
/* National Semiconductor CompactRISC micorprocessor */
293
#define EM_F2MC16 104
/* Fujitsu F2MC16 */
294
#define EM_MSP430 105
/* Texas Instruments MSP430 */
295
#define EM_BLACKFIN 106
/* Analog Devices Blackfin DSP */
296
#define EM_SE_C33 107
/* Seiko Epson S1C33 family */
297
#define EM_SEP 108
/* Sharp embedded microprocessor */
298
#define EM_ARCA 109
/* Arca RISC microprocessor */
299
#define EM_UNICORE 110
/* UNICORE from PKU-Unity Ltd. and MPRC Peking University */
300
#define EM_ALTERA_NIOS2 113
/* Altera Nios II soft-core processor */
301
#define EM_AARCH64 183
/* AArch64 64-bit ARM microprocessor */
302
#define EM_AVR32 185
/* Atmel Corporation 32-bit microprocessor family*/
303
#define EM_TILE64 187
/* Tilera TILE64 multicore architecture family */
304
#define EM_TILEPRO 188
/* Tilera TILEPro multicore architecture family */
305
#define EM_MICROBLAZE 189
/* Xilinx MicroBlaze 32-bit RISC soft processor core */
306
#define EM_TILEGX 192
/* Tilera TILE-GX multicore architecture family */
307
#define EM_Z80 220
/* Zilog Z80 */
308
#define EM_RISCV 243
/* RISC-V */
309
310
/*
311
* Program Header
312
*/
313
typedef
struct
{
314
Elf32_Word
p_type
;
/* entry type */
315
Elf32_Off
p_offset
;
/* offset */
316
Elf32_Addr
p_vaddr
;
/* virtual address */
317
Elf32_Addr
p_paddr
;
/* physical address */
318
Elf32_Word
p_filesz
;
/* file size */
319
Elf32_Word
p_memsz
;
/* memory size */
320
Elf32_Word
p_flags
;
/* flags */
321
Elf32_Word
p_align
;
/* memory & file alignment */
322
}
Elf32_Phdr
;
323
324
typedef
struct
{
325
Elf64_Half
p_type
;
/* entry type */
326
Elf64_Half
p_flags
;
/* flags */
327
Elf64_Off
p_offset
;
/* offset */
328
Elf64_Addr
p_vaddr
;
/* virtual address */
329
Elf64_Addr
p_paddr
;
/* physical address */
330
Elf64_Xword
p_filesz
;
/* file size */
331
Elf64_Xword
p_memsz
;
/* memory size */
332
Elf64_Xword
p_align
;
/* memory & file alignment */
333
}
Elf64_Phdr
;
334
335
/* p_type */
336
#define PT_NULL 0
/* Program header table entry unused */
337
#define PT_LOAD 1
/* Loadable program segment */
338
#define PT_DYNAMIC 2
/* Dynamic linking information */
339
#define PT_INTERP 3
/* Program interpreter */
340
#define PT_NOTE 4
/* Auxiliary information */
341
#define PT_SHLIB 5
/* Reserved, unspecified semantics */
342
#define PT_PHDR 6
/* Entry for header table itself */
343
#define PT_NUM 7
344
345
/* p_flags */
346
#define PF_R 0x4
/* Segment is readable */
347
#define PF_W 0x2
/* Segment is writable */
348
#define PF_X 0x1
/* Segment is executable */
349
350
#define PF_MASKOS 0x0ff00000
/* Opersting system specific values */
351
#define PF_MASKPROC 0xf0000000
/* Processor-specific values */
352
353
#define PT_LOPROC 0x70000000
/* Processor-specific range */
354
#define PT_HIPROC 0x7fffffff
355
356
#define PT_MIPS_REGINFO 0x70000000
357
358
/*
359
* Section Headers
360
*/
361
typedef
struct
{
362
Elf32_Word
sh_name
;
/* section name (.shstrtab index) */
363
Elf32_Word
sh_type
;
/* section type */
364
Elf32_Word
sh_flags
;
/* section flags */
365
Elf32_Addr
sh_addr
;
/* virtual address */
366
Elf32_Off
sh_offset
;
/* file offset */
367
Elf32_Word
sh_size
;
/* section size */
368
Elf32_Word
sh_link
;
/* link to another */
369
Elf32_Word
sh_info
;
/* misc info */
370
Elf32_Word
sh_addralign
;
/* memory alignment */
371
Elf32_Word
sh_entsize
;
/* table entry size */
372
}
Elf32_Shdr
;
373
374
typedef
struct
{
375
Elf64_Half
sh_name
;
/* section name (.shstrtab index) */
376
Elf64_Half
sh_type
;
/* section type */
377
Elf64_Xword
sh_flags
;
/* section flags */
378
Elf64_Addr
sh_addr
;
/* virtual address */
379
Elf64_Off
sh_offset
;
/* file offset */
380
Elf64_Xword
sh_size
;
/* section size */
381
Elf64_Half
sh_link
;
/* link to another */
382
Elf64_Half
sh_info
;
/* misc info */
383
Elf64_Xword
sh_addralign
;
/* memory alignment */
384
Elf64_Xword
sh_entsize
;
/* table entry size */
385
}
Elf64_Shdr
;
386
387
/* sh_type */
388
#define SHT_NULL 0
389
#define SHT_PROGBITS 1
390
#define SHT_SYMTAB 2
391
#define SHT_STRTAB 3
392
#define SHT_RELA 4
393
#define SHT_HASH 5
394
#define SHT_DYNAMIC 6
395
#define SHT_NOTE 7
396
#define SHT_NOBITS 8
397
#define SHT_REL 9
398
#define SHT_SHLIB 10
399
#define SHT_DYNSYM 11
400
#define SHT_NUM 12
401
402
#define SHT_LOOS 0x60000000
/* Operating system specific range */
403
#define SHT_HIOS 0x6fffffff
404
#define SHT_LOPROC 0x70000000
/* Processor-specific range */
405
#define SHT_HIPROC 0x7fffffff
406
#define SHT_LOUSER 0x80000000
/* Application-specific range */
407
#define SHT_HIUSER 0xffffffff
408
409
/* sh_flags */
410
#define SHF_WRITE 0x1
/* Section contains writable data */
411
#define SHF_ALLOC 0x2
/* Section occupies memory */
412
#define SHF_EXECINSTR 0x4
/* Section contains executable insns */
413
414
#define SHF_MASKOS 0x0f000000
/* Operating system specific values */
415
#define SHF_MASKPROC 0xf0000000
/* Processor-specific values */
416
417
/*
418
* Symbol Table
419
*/
420
typedef
struct
{
421
Elf32_Word
st_name
;
/* Symbol name (.symtab index) */
422
Elf32_Word
st_value
;
/* value of symbol */
423
Elf32_Word
st_size
;
/* size of symbol */
424
Elf_Byte
st_info
;
/* type / binding attrs */
425
Elf_Byte
st_other
;
/* unused */
426
Elf32_Half
st_shndx
;
/* section index of symbol */
427
}
Elf32_Sym
;
428
429
typedef
struct
{
430
Elf64_Half
st_name
;
/* Symbol name (.symtab index) */
431
Elf_Byte
st_info
;
/* type / binding attrs */
432
Elf_Byte
st_other
;
/* unused */
433
Elf64_Quarter
st_shndx
;
/* section index of symbol */
434
Elf64_Addr
st_value
;
/* value of symbol */
435
Elf64_Xword
st_size
;
/* size of symbol */
436
}
Elf64_Sym
;
437
438
/* Symbol Table index of the undefined symbol */
439
#define ELF_SYM_UNDEFINED 0
440
441
/* st_info: Symbol Bindings */
442
#define STB_LOCAL 0
/* local symbol */
443
#define STB_GLOBAL 1
/* global symbol */
444
#define STB_WEAK 2
/* weakly defined global symbol */
445
#define STB_NUM 3
446
447
#define STB_LOOS 10
/* Operating system specific range */
448
#define STB_HIOS 12
449
#define STB_LOPROC 13
/* Processor-specific range */
450
#define STB_HIPROC 15
451
452
/* st_info: Symbol Types */
453
#define STT_NOTYPE 0
/* Type not specified */
454
#define STT_OBJECT 1
/* Associated with a data object */
455
#define STT_FUNC 2
/* Associated with a function */
456
#define STT_SECTION 3
/* Associated with a section */
457
#define STT_FILE 4
/* Associated with a file name */
458
#define STT_NUM 5
459
460
#define STT_LOOS 10
/* Operating system specific range */
461
#define STT_HIOS 12
462
#define STT_LOPROC 13
/* Processor-specific range */
463
#define STT_HIPROC 15
464
465
/* st_info utility macros */
466
#define ELF32_ST_BIND(info) ((Elf32_Word)(info) >> 4)
467
#define ELF32_ST_TYPE(info) ((Elf32_Word)(info) & 0xf)
468
#define ELF32_ST_INFO(bind,type) ((Elf_Byte)(((bind) << 4) | ((type) & 0xf)))
469
470
#define ELF64_ST_BIND(info) ((Elf64_Xword)(info) >> 4)
471
#define ELF64_ST_TYPE(info) ((Elf64_Xword)(info) & 0xf)
472
#define ELF64_ST_INFO(bind,type) ((Elf_Byte)(((bind) << 4) | ((type) & 0xf)))
473
474
/*
475
* Special section indexes
476
*/
477
#define SHN_UNDEF 0
/* Undefined section */
478
479
#define SHN_LORESERVE 0xff00
/* Reserved range */
480
#define SHN_ABS 0xfff1
/* Absolute symbols */
481
#define SHN_COMMON 0xfff2
/* Common symbols */
482
#define SHN_HIRESERVE 0xffff
483
484
#define SHN_LOPROC 0xff00
/* Processor-specific range */
485
#define SHN_HIPROC 0xff1f
486
#define SHN_LOOS 0xff20
/* Operating system specific range */
487
#define SHN_HIOS 0xff3f
488
489
#define SHN_MIPS_ACOMMON 0xff00
490
#define SHN_MIPS_TEXT 0xff01
491
#define SHN_MIPS_DATA 0xff02
492
#define SHN_MIPS_SCOMMON 0xff03
493
494
/*
495
* Relocation Entries
496
*/
497
typedef
struct
{
498
Elf32_Word
r_offset
;
/* where to do it */
499
Elf32_Word
r_info
;
/* index & type of relocation */
500
}
Elf32_Rel
;
501
502
typedef
struct
{
503
Elf32_Word
r_offset
;
/* where to do it */
504
Elf32_Word
r_info
;
/* index & type of relocation */
505
Elf32_Sword
r_addend
;
/* adjustment value */
506
}
Elf32_Rela
;
507
508
/* r_info utility macros */
509
#define ELF32_R_SYM(info) ((info) >> 8)
510
#define ELF32_R_TYPE(info) ((info) & 0xff)
511
#define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type))
512
513
typedef
struct
{
514
Elf64_Addr
r_offset
;
/* where to do it */
515
Elf64_Xword
r_info
;
/* index & type of relocation */
516
}
Elf64_Rel
;
517
518
typedef
struct
{
519
Elf64_Addr
r_offset
;
/* where to do it */
520
Elf64_Xword
r_info
;
/* index & type of relocation */
521
Elf64_Sxword
r_addend
;
/* adjustment value */
522
}
Elf64_Rela
;
523
524
/* r_info utility macros */
525
#define ELF64_R_SYM(info) ((info) >> 32)
526
#define ELF64_R_TYPE(info) ((info) & 0xffffffff)
527
#define ELF64_R_INFO(sym,type) (((sym) << 32) + (type))
528
529
/*
530
* Dynamic Section structure array
531
*/
532
typedef
struct
{
533
Elf32_Word
d_tag
;
/* entry tag value */
534
union
{
535
Elf32_Addr
d_ptr
;
536
Elf32_Word
d_val
;
537
} d_un;
538
}
Elf32_Dyn
;
539
540
typedef
struct
{
541
Elf64_Xword
d_tag
;
/* entry tag value */
542
union
{
543
Elf64_Addr
d_ptr
;
544
Elf64_Xword
d_val
;
545
} d_un;
546
}
Elf64_Dyn
;
547
548
/* d_tag */
549
#define DT_NULL 0
/* Marks end of dynamic array */
550
#define DT_NEEDED 1
/* Name of needed library (DT_STRTAB offset) */
551
#define DT_PLTRELSZ 2
/* Size, in bytes, of relocations in PLT */
552
#define DT_PLTGOT 3
/* Address of PLT and/or GOT */
553
#define DT_HASH 4
/* Address of symbol hash table */
554
#define DT_STRTAB 5
/* Address of string table */
555
#define DT_SYMTAB 6
/* Address of symbol table */
556
#define DT_RELA 7
/* Address of Rela relocation table */
557
#define DT_RELASZ 8
/* Size, in bytes, of DT_RELA table */
558
#define DT_RELAENT 9
/* Size, in bytes, of one DT_RELA entry */
559
#define DT_STRSZ 10
/* Size, in bytes, of DT_STRTAB table */
560
#define DT_SYMENT 11
/* Size, in bytes, of one DT_SYMTAB entry */
561
#define DT_INIT 12
/* Address of initialization function */
562
#define DT_FINI 13
/* Address of termination function */
563
#define DT_SONAME 14
/* Shared object name (DT_STRTAB offset) */
564
#define DT_RPATH 15
/* Library search path (DT_STRTAB offset) */
565
#define DT_SYMBOLIC 16
/* Start symbol search within local object */
566
#define DT_REL 17
/* Address of Rel relocation table */
567
#define DT_RELSZ 18
/* Size, in bytes, of DT_REL table */
568
#define DT_RELENT 19
/* Size, in bytes, of one DT_REL entry */
569
#define DT_PLTREL 20
/* Type of PLT relocation entries */
570
#define DT_DEBUG 21
/* Used for debugging; unspecified */
571
#define DT_TEXTREL 22
/* Relocations might modify non-writable seg */
572
#define DT_JMPREL 23
/* Address of relocations associated with PLT */
573
#define DT_BIND_NOW 24
/* Process all relocations at load-time */
574
#define DT_INIT_ARRAY 25
/* Address of initialization function array */
575
#define DT_FINI_ARRAY 26
/* Size, in bytes, of DT_INIT_ARRAY array */
576
#define DT_INIT_ARRAYSZ 27
/* Address of termination function array */
577
#define DT_FINI_ARRAYSZ 28
/* Size, in bytes, of DT_FINI_ARRAY array*/
578
#define DT_NUM 29
579
580
#define DT_LOOS 0x60000000
/* Operating system specific range */
581
#define DT_HIOS 0x6fffffff
582
#define DT_LOPROC 0x70000000
/* Processor-specific range */
583
#define DT_HIPROC 0x7fffffff
584
585
/*
586
* Auxiliary Vectors
587
*/
588
typedef
struct
{
589
Elf32_Word
a_type
;
/* 32-bit id */
590
Elf32_Word
a_v
;
/* 32-bit id */
591
}
Aux32Info
;
592
593
typedef
struct
{
594
Elf64_Half
a_type
;
/* 32-bit id */
595
Elf64_Xword
a_v
;
/* 64-bit id */
596
}
Aux64Info
;
597
598
/* a_type */
599
#define AT_NULL 0
/* Marks end of array */
600
#define AT_IGNORE 1
/* No meaning, a_un is undefined */
601
#define AT_EXECFD 2
/* Open file descriptor of object file */
602
#define AT_PHDR 3
/* &phdr[0] */
603
#define AT_PHENT 4
/* sizeof(phdr[0]) */
604
#define AT_PHNUM 5
/* # phdr entries */
605
#define AT_PAGESZ 6
/* PAGESIZE */
606
#define AT_BASE 7
/* Interpreter base addr */
607
#define AT_FLAGS 8
/* Processor flags */
608
#define AT_ENTRY 9
/* Entry address of executable */
609
#define AT_DCACHEBSIZE 10
/* Data cache block size */
610
#define AT_ICACHEBSIZE 11
/* Instruction cache block size */
611
#define AT_UCACHEBSIZE 12
/* Unified cache block size */
612
613
/* Vendor specific */
614
#define AT_MIPS_NOTELF 10
/* XXX a_val != 0 -> MIPS XCOFF executable */
615
616
#define AT_SUN_UID 2000
/* euid */
617
#define AT_SUN_RUID 2001
/* ruid */
618
#define AT_SUN_GID 2002
/* egid */
619
#define AT_SUN_RGID 2003
/* rgid */
620
621
/* Solaris kernel specific */
622
#define AT_SUN_LDELF 2004
/* dynamic linker's ELF header */
623
#define AT_SUN_LDSHDR 2005
/* dynamic linker's section header */
624
#define AT_SUN_LDNAME 2006
/* dynamic linker's name */
625
#define AT_SUN_LPGSIZE 2007
/* large pagesize */
626
627
/* Other information */
628
#define AT_SUN_PLATFORM 2008
/* sysinfo(SI_PLATFORM) */
629
#define AT_SUN_HWCAP 2009
/* process hardware capabilities */
630
#define AT_SUN_IFLUSH 2010
/* do we need to flush the instruction cache? */
631
#define AT_SUN_CPU 2011
/* cpu name */
632
/* ibcs2 emulation band aid */
633
#define AT_SUN_EMUL_ENTRY 2012
/* coff entry point */
634
#define AT_SUN_EMUL_EXECFD 2013
/* coff file descriptor */
635
/* Executable's fully resolved name */
636
#define AT_SUN_EXECNAME 2014
637
638
/*
639
* Note Headers
640
*/
641
typedef
struct
{
642
Elf32_Word
n_namesz
;
643
Elf32_Word
n_descsz
;
644
Elf32_Word
n_type
;
645
}
Elf32_Nhdr
;
646
647
typedef
struct
{
648
Elf64_Half
n_namesz
;
649
Elf64_Half
n_descsz
;
650
Elf64_Half
n_type
;
651
}
Elf64_Nhdr
;
652
653
#define ELF_NOTE_TYPE_OSVERSION 1
654
655
/* NetBSD-specific note type: OS Version. desc is 4-byte NetBSD integer. */
656
#define ELF_NOTE_NETBSD_TYPE_OSVERSION ELF_NOTE_TYPE_OSVERSION
657
658
/* NetBSD-specific note type: Emulation name. desc is emul name string. */
659
#define ELF_NOTE_NETBSD_TYPE_EMULNAME 2
660
661
/* NetBSD-specific note name and description sizes */
662
#define ELF_NOTE_NETBSD_NAMESZ 7
663
#define ELF_NOTE_NETBSD_DESCSZ 4
664
/* NetBSD-specific note name */
665
#define ELF_NOTE_NETBSD_NAME "NetBSD\0\0"
666
667
/* GNU-specific note name and description sizes */
668
#define ELF_NOTE_GNU_NAMESZ 4
669
#define ELF_NOTE_GNU_DESCSZ 4
670
/* GNU-specific note name */
671
#define ELF_NOTE_GNU_NAME "GNU\0"
672
673
/* GNU-specific OS/version value stuff */
674
#define ELF_NOTE_GNU_OSMASK (u_int32_t)0xff000000
675
#define ELF_NOTE_GNU_OSLINUX (u_int32_t)0x01000000
676
#define ELF_NOTE_GNU_OSMACH (u_int32_t)0x00000000
677
678
#if defined(ELFSIZE)
679
#define CONCAT(x,y) __CONCAT(x,y)
680
#define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x)))
681
#define ELFNAME2(x,y) CONCAT(x,CONCAT(_elf,CONCAT(ELFSIZE,CONCAT(_,y))))
682
#define ELFNAMEEND(x) CONCAT(x,CONCAT(_elf,ELFSIZE))
683
#define ELFDEFNNAME(x) CONCAT(ELF,CONCAT(ELFSIZE,CONCAT(_,x)))
684
#endif
685
686
/* #include <machine/elf_machdep.h> */
687
688
#if defined(ELFSIZE) && (ELFSIZE == 32)
689
#define Elf_Ehdr Elf32_Ehdr
690
#define Elf_Phdr Elf32_Phdr
691
#define Elf_Shdr Elf32_Shdr
692
#define Elf_Sym Elf32_Sym
693
#define Elf_Rel Elf32_Rel
694
#define Elf_Rela Elf32_Rela
695
#define Elf_Dyn Elf32_Dyn
696
#define Elf_Word Elf32_Word
697
#define Elf_Sword Elf32_Sword
698
#define Elf_Addr Elf32_Addr
699
#define Elf_Off Elf32_Off
700
#define Elf_Nhdr Elf32_Nhdr
701
702
#define ELF_R_SYM ELF32_R_SYM
703
#define ELF_R_TYPE ELF32_R_TYPE
704
#define ELFCLASS ELFCLASS32
705
706
#define ELF_ST_BIND ELF32_ST_BIND
707
#define ELF_ST_TYPE ELF32_ST_TYPE
708
#define ELF_ST_INFO ELF32_ST_INFO
709
710
#define AuxInfo Aux32Info
711
#elif defined(ELFSIZE) && (ELFSIZE == 64)
712
#define Elf_Ehdr Elf64_Ehdr
713
#define Elf_Phdr Elf64_Phdr
714
#define Elf_Shdr Elf64_Shdr
715
#define Elf_Sym Elf64_Sym
716
#define Elf_Rel Elf64_Rel
717
#define Elf_Rela Elf64_Rela
718
#define Elf_Dyn Elf64_Dyn
719
#define Elf_Word Elf64_Word
720
#define Elf_Sword Elf64_Sword
721
#define Elf_Addr Elf64_Addr
722
#define Elf_Off Elf64_Off
723
#define Elf_Nhdr Elf64_Nhdr
724
725
#define ELF_R_SYM ELF64_R_SYM
726
#define ELF_R_TYPE ELF64_R_TYPE
727
#define ELFCLASS ELFCLASS64
728
729
#define ELF_ST_BIND ELF64_ST_BIND
730
#define ELF_ST_TYPE ELF64_ST_TYPE
731
#define ELF_ST_INFO ELF64_ST_INFO
732
733
#define AuxInfo Aux64Info
734
#endif
735
736
#ifdef _KERNEL
737
738
#define ELF_AUX_ENTRIES 8
/* Size of aux array passed to loader */
739
#define ELF32_NO_ADDR (~(Elf32_Addr)0)
/* Indicates addr. not yet filled in */
740
#define ELF64_NO_ADDR (~(Elf64_Addr)0)
/* Indicates addr. not yet filled in */
741
742
#if defined(ELFSIZE) && (ELFSIZE == 64)
743
#define ELF_NO_ADDR ELF64_NO_ADDR
744
#elif defined(ELFSIZE) && (ELFSIZE == 32)
745
#define ELF_NO_ADDR ELF32_NO_ADDR
746
#endif
747
748
#if defined(ELFSIZE)
749
struct
elf_args {
750
Elf_Addr arg_entry;
/* program entry point */
751
Elf_Addr arg_interp;
/* Interpreter load address */
752
Elf_Addr arg_phaddr;
/* program header address */
753
Elf_Addr arg_phentsize;
/* Size of program header */
754
Elf_Addr arg_phnum;
/* Number of program headers */
755
};
756
#endif
757
758
#ifndef _LKM
759
#include "opt_execfmt.h"
760
#endif
761
762
#ifdef EXEC_ELF32
763
int
exec_elf32_makecmds
__P
((
struct
proc *,
struct
exec_package *));
764
int
elf32_read_from
__P
((
struct
proc *,
struct
vnode *, u_long,
765
caddr_t,
int
));
766
void
*elf32_copyargs
__P
((
struct
exec_package *,
struct
ps_strings *,
767
void
*,
void
*));
768
#endif
769
770
#ifdef EXEC_ELF64
771
int
exec_elf64_makecmds
__P
((
struct
proc *,
struct
exec_package *));
772
int
elf64_read_from
__P
((
struct
proc *,
struct
vnode *, u_long,
773
caddr_t,
int
));
774
void
*elf64_copyargs
__P
((
struct
exec_package *,
struct
ps_strings *,
775
void
*,
void
*));
776
#endif
777
778
/* common */
779
int
exec_elf_setup_stack
__P
((
struct
proc *,
struct
exec_package *));
780
781
#endif
/* _KERNEL */
782
783
#endif
/* __EXEC_ELF_H */
784
Elf32_Sym::st_value
Elf32_Word st_value
Definition:
exec_elf.h:422
Elf32_Dyn::d_val
Elf32_Word d_val
Definition:
exec_elf.h:536
Elf64_Shdr::sh_name
Elf64_Half sh_name
Definition:
exec_elf.h:375
Elf32_Shdr::sh_type
Elf32_Word sh_type
Definition:
exec_elf.h:363
Elf64_Sym::st_value
Elf64_Addr st_value
Definition:
exec_elf.h:434
Aux64Info::a_type
Elf64_Half a_type
Definition:
exec_elf.h:594
Elf64_Rela::r_offset
Elf64_Addr r_offset
Definition:
exec_elf.h:519
Elf32_Ehdr::e_version
Elf32_Word e_version
Definition:
exec_elf.h:97
Elf64_Nhdr
Definition:
exec_elf.h:647
Elf64_Dyn::d_tag
Elf64_Xword d_tag
Definition:
exec_elf.h:541
Elf32_Shdr::sh_size
Elf32_Word sh_size
Definition:
exec_elf.h:367
Elf64_Ehdr::e_shoff
Elf64_Off e_shoff
Definition:
exec_elf.h:117
Elf32_Phdr::p_align
Elf32_Word p_align
Definition:
exec_elf.h:321
Elf64_Phdr::p_filesz
Elf64_Xword p_filesz
Definition:
exec_elf.h:330
Elf64_Ehdr::e_phnum
Elf64_Quarter e_phnum
Definition:
exec_elf.h:121
Elf64_Half
uint32_t Elf64_Half
Definition:
exec_elf.h:83
Elf32_Dyn
Definition:
exec_elf.h:532
Elf64_Phdr::p_type
Elf64_Half p_type
Definition:
exec_elf.h:325
Elf64_Ehdr::e_phentsize
Elf64_Quarter e_phentsize
Definition:
exec_elf.h:120
Elf64_Ehdr::e_type
Elf64_Quarter e_type
Definition:
exec_elf.h:112
Elf32_Ehdr::e_ehsize
Elf32_Half e_ehsize
Definition:
exec_elf.h:102
Elf32_Rel
Definition:
exec_elf.h:497
Elf32_Ehdr::e_phoff
Elf32_Off e_phoff
Definition:
exec_elf.h:99
Elf64_Shdr::sh_offset
Elf64_Off sh_offset
Definition:
exec_elf.h:379
Elf32_Nhdr::n_type
Elf32_Word n_type
Definition:
exec_elf.h:644
Elf32_Shdr::sh_addr
Elf32_Addr sh_addr
Definition:
exec_elf.h:365
Elf64_Rela::r_addend
Elf64_Sxword r_addend
Definition:
exec_elf.h:521
Elf32_Phdr::p_memsz
Elf32_Word p_memsz
Definition:
exec_elf.h:319
Elf32_Off
uint32_t Elf32_Off
Definition:
exec_elf.h:52
Elf32_Shdr::sh_entsize
Elf32_Word sh_entsize
Definition:
exec_elf.h:371
Elf64_Nhdr::n_type
Elf64_Half n_type
Definition:
exec_elf.h:650
Elf64_Sym::st_name
Elf64_Half st_name
Definition:
exec_elf.h:430
Elf32_Sym::st_info
Elf_Byte st_info
Definition:
exec_elf.h:424
Elf64_Shdr::sh_info
Elf64_Half sh_info
Definition:
exec_elf.h:382
Elf32_Shdr::sh_offset
Elf32_Off sh_offset
Definition:
exec_elf.h:366
Elf64_Ehdr::e_phoff
Elf64_Off e_phoff
Definition:
exec_elf.h:116
Elf64_Ehdr::e_machine
Elf64_Quarter e_machine
Definition:
exec_elf.h:113
Elf32_Ehdr::e_shentsize
Elf32_Half e_shentsize
Definition:
exec_elf.h:105
Elf64_Ehdr::e_shentsize
Elf64_Quarter e_shentsize
Definition:
exec_elf.h:122
Elf32_Nhdr
Definition:
exec_elf.h:641
Aux32Info::a_type
Elf32_Word a_type
Definition:
exec_elf.h:589
Elf64_Off
uint64_t Elf64_Off
Definition:
exec_elf.h:63
Aux64Info::a_v
Elf64_Xword a_v
Definition:
exec_elf.h:595
Elf64_Ehdr::e_ehsize
Elf64_Quarter e_ehsize
Definition:
exec_elf.h:119
Aux64Info
Definition:
exec_elf.h:593
Elf64_Dyn::d_val
Elf64_Xword d_val
Definition:
exec_elf.h:544
Elf32_Phdr::p_type
Elf32_Word p_type
Definition:
exec_elf.h:314
Elf64_Dyn::d_ptr
Elf64_Addr d_ptr
Definition:
exec_elf.h:543
Elf64_Rel::r_info
Elf64_Xword r_info
Definition:
exec_elf.h:515
Elf64_Nhdr::n_namesz
Elf64_Half n_namesz
Definition:
exec_elf.h:648
Elf32_Sym::st_other
Elf_Byte st_other
Definition:
exec_elf.h:425
Elf32_Rel::r_offset
Elf32_Word r_offset
Definition:
exec_elf.h:498
Elf64_Phdr::p_vaddr
Elf64_Addr p_vaddr
Definition:
exec_elf.h:328
Elf64_Phdr
Definition:
exec_elf.h:324
Elf32_Ehdr::e_shoff
Elf32_Off e_shoff
Definition:
exec_elf.h:100
Elf32_Phdr::p_offset
Elf32_Off p_offset
Definition:
exec_elf.h:315
Elf32_Ehdr::e_flags
Elf32_Word e_flags
Definition:
exec_elf.h:101
Elf64_Nhdr::n_descsz
Elf64_Half n_descsz
Definition:
exec_elf.h:649
Elf32_Phdr::p_vaddr
Elf32_Addr p_vaddr
Definition:
exec_elf.h:316
Elf32_Phdr::p_paddr
Elf32_Addr p_paddr
Definition:
exec_elf.h:317
Aux32Info
Definition:
exec_elf.h:588
Elf64_Shdr::sh_addr
Elf64_Addr sh_addr
Definition:
exec_elf.h:378
Elf32_Dyn::d_tag
Elf32_Word d_tag
Definition:
exec_elf.h:533
Elf32_Half
uint16_t Elf32_Half
Definition:
exec_elf.h:58
Elf32_Shdr::sh_flags
Elf32_Word sh_flags
Definition:
exec_elf.h:364
Elf64_Sym::st_size
Elf64_Xword st_size
Definition:
exec_elf.h:435
Elf64_Rela::r_info
Elf64_Xword r_info
Definition:
exec_elf.h:520
Elf64_Shdr::sh_type
Elf64_Half sh_type
Definition:
exec_elf.h:376
Elf32_Ehdr::e_shstrndx
Elf32_Half e_shstrndx
Definition:
exec_elf.h:107
Elf64_Phdr::p_paddr
Elf64_Addr p_paddr
Definition:
exec_elf.h:329
Elf32_Phdr::p_filesz
Elf32_Word p_filesz
Definition:
exec_elf.h:318
Elf64_Ehdr
Definition:
exec_elf.h:110
Elf64_Shdr
Definition:
exec_elf.h:374
Elf64_Sword
int64_t Elf64_Sword
Definition:
exec_elf.h:74
Elf32_Addr
uint32_t Elf32_Addr
Definition:
exec_elf.h:50
Elf32_Ehdr::e_entry
Elf32_Addr e_entry
Definition:
exec_elf.h:98
Elf32_Sym::st_name
Elf32_Word st_name
Definition:
exec_elf.h:421
Elf64_Shdr::sh_link
Elf64_Half sh_link
Definition:
exec_elf.h:381
Elf32_Phdr
Definition:
exec_elf.h:313
Elf64_Sym::st_info
Elf_Byte st_info
Definition:
exec_elf.h:431
Elf32_Word
uint32_t Elf32_Word
Definition:
exec_elf.h:56
Elf64_Shdr::sh_flags
Elf64_Xword sh_flags
Definition:
exec_elf.h:377
Elf32_Ehdr::e_machine
Elf32_Half e_machine
Definition:
exec_elf.h:96
Elf32_Phdr::p_flags
Elf32_Word p_flags
Definition:
exec_elf.h:320
Elf64_Phdr::p_align
Elf64_Xword p_align
Definition:
exec_elf.h:332
Elf64_Ehdr::e_shnum
Elf64_Quarter e_shnum
Definition:
exec_elf.h:123
Elf32_Sym::st_shndx
Elf32_Half st_shndx
Definition:
exec_elf.h:426
Elf64_Dyn
Definition:
exec_elf.h:540
Elf_Byte
uint8_t Elf_Byte
Definition:
exec_elf.h:48
Elf32_Rela::r_offset
Elf32_Word r_offset
Definition:
exec_elf.h:503
Elf64_Sym::st_shndx
Elf64_Quarter st_shndx
Definition:
exec_elf.h:433
Elf32_Shdr::sh_name
Elf32_Word sh_name
Definition:
exec_elf.h:362
Elf64_Phdr::p_offset
Elf64_Off p_offset
Definition:
exec_elf.h:327
Elf64_Shdr::sh_entsize
Elf64_Xword sh_entsize
Definition:
exec_elf.h:384
Elf32_Dyn::d_ptr
Elf32_Addr d_ptr
Definition:
exec_elf.h:535
Elf64_Shalf
int32_t Elf64_Shalf
Definition:
exec_elf.h:65
Elf32_Ehdr
Definition:
exec_elf.h:93
Elf32_Shdr
Definition:
exec_elf.h:361
Elf64_Ehdr::e_flags
Elf64_Half e_flags
Definition:
exec_elf.h:118
Elf64_Ehdr::e_entry
Elf64_Addr e_entry
Definition:
exec_elf.h:115
Elf64_Phdr::p_flags
Elf64_Half p_flags
Definition:
exec_elf.h:326
Elf32_Rela::r_info
Elf32_Word r_info
Definition:
exec_elf.h:504
Aux32Info::a_v
Elf32_Word a_v
Definition:
exec_elf.h:590
Elf32_Ehdr::e_shnum
Elf32_Half e_shnum
Definition:
exec_elf.h:106
ELF_NIDENT
#define ELF_NIDENT
Definition:
exec_elf.h:91
Elf32_Rela::r_addend
Elf32_Sword r_addend
Definition:
exec_elf.h:505
Elf64_Addr
uint64_t Elf64_Addr
Definition:
exec_elf.h:61
Elf64_Rel
Definition:
exec_elf.h:513
Elf32_Nhdr::n_namesz
Elf32_Word n_namesz
Definition:
exec_elf.h:642
Elf64_Rela
Definition:
exec_elf.h:518
Elf32_Shdr::sh_addralign
Elf32_Word sh_addralign
Definition:
exec_elf.h:370
Elf32_Ehdr::e_phentsize
Elf32_Half e_phentsize
Definition:
exec_elf.h:103
Elf64_Ehdr::e_shstrndx
Elf64_Quarter e_shstrndx
Definition:
exec_elf.h:124
Elf32_Sym::st_size
Elf32_Word st_size
Definition:
exec_elf.h:423
Elf64_Xword
uint64_t Elf64_Xword
Definition:
exec_elf.h:81
Elf32_Ehdr::e_type
Elf32_Half e_type
Definition:
exec_elf.h:95
Elf64_Rel::r_offset
Elf64_Addr r_offset
Definition:
exec_elf.h:514
Elf32_Rela
Definition:
exec_elf.h:502
Elf64_Sym
Definition:
exec_elf.h:429
Elf32_Shdr::sh_link
Elf32_Word sh_link
Definition:
exec_elf.h:368
Elf32_Nhdr::n_descsz
Elf32_Word n_descsz
Definition:
exec_elf.h:643
Elf64_Shdr::sh_size
Elf64_Xword sh_size
Definition:
exec_elf.h:380
Elf32_Shdr::sh_info
Elf32_Word sh_info
Definition:
exec_elf.h:369
Elf64_Shdr::sh_addralign
Elf64_Xword sh_addralign
Definition:
exec_elf.h:383
Elf64_Sxword
int64_t Elf64_Sxword
Definition:
exec_elf.h:79
__P
#define __P(x)
Definition:
dec_prom.h:6
Elf64_Word
uint64_t Elf64_Word
Definition:
exec_elf.h:76
Elf32_Sym
Definition:
exec_elf.h:420
Elf64_Quarter
uint16_t Elf64_Quarter
Definition:
exec_elf.h:85
Elf64_Ehdr::e_version
Elf64_Half e_version
Definition:
exec_elf.h:114
Elf64_Sym::st_other
Elf_Byte st_other
Definition:
exec_elf.h:432
Elf32_Sword
int32_t Elf32_Sword
Definition:
exec_elf.h:54
Elf64_Phdr::p_memsz
Elf64_Xword p_memsz
Definition:
exec_elf.h:331
Elf32_Rel::r_info
Elf32_Word r_info
Definition:
exec_elf.h:499
Elf32_Ehdr::e_phnum
Elf32_Half e_phnum
Definition:
exec_elf.h:104
Generated on Tue Aug 25 2020 19:25:06 for GXemul by
1.8.18