L4Re - L4 Runtime Environment
|
Functions and types related to ELF binaries. More...
Files | |
file | elf.h |
ELF definition. | |
Data Structures | |
struct | Elf32_Ehdr |
ELF32 header. More... | |
struct | Elf64_Ehdr |
ELF64 header. More... | |
struct | Elf32_Shdr |
ELF32 section header - figure 1-9, page 1-9. More... | |
struct | Elf64_Shdr |
ELF64 section header. More... | |
struct | Elf32_Phdr |
ELF32 program header. More... | |
struct | Elf64_Phdr |
ELF64 program header. More... | |
struct | Elf32_Dyn |
ELF32 dynamic entry. More... | |
struct | Elf64_Dyn |
ELF64 dynamic entry. More... | |
struct | Elf32_Sym |
ELF32 symbol table entry. More... | |
struct | Elf64_Sym |
ELF64 symbol table entry. More... | |
Macros | |
#define | EI_NIDENT 16 |
number of characters | |
#define | EI_CLASS 4 |
ELF class byte index. More... | |
#define | EI_CLASS 4 |
ELF class byte index. More... | |
#define | ELFCLASSNONE 0 |
Invalid ELF class. More... | |
#define | ELFCLASSNONE 0 |
Invalid ELF class. More... | |
#define | ELFCLASS32 1 |
32-bit objects | |
#define | ELFCLASS64 2 |
64-bit objects | |
#define | ELFCLASSNUM 3 |
Mask for 32-bit or 64-bit class. | |
#define | EI_DATA 5 |
Data encoding byte index. More... | |
#define | EI_DATA 5 |
Data encoding byte index. More... | |
#define | ELFDATANONE 0 |
Invalid data encoding. More... | |
#define | ELFDATANONE 0 |
Invalid data encoding. More... | |
#define | ELFDATA2LSB 1 |
2's complement, little endian More... | |
#define | ELFDATA2LSB 1 |
2's complement, little endian More... | |
#define | ELFDATA2MSB 2 |
2's complement, big endian More... | |
#define | ELFDATA2MSB 2 |
2's complement, big endian More... | |
#define | EI_VERSION 6 |
File version byte index. More... | |
#define | EI_VERSION 6 |
File version byte index. More... | |
#define | EI_OSABI 7 |
OS ABI identification. More... | |
#define | EI_OSABI 7 |
OS ABI identification. More... | |
#define | ELFOSABI_NONE 0 |
UNIX System V ABI. | |
#define | ELFOSABI_SYSV 0 |
Alias. More... | |
#define | ELFOSABI_SYSV 0 |
Alias. More... | |
#define | ELFOSABI_HPUX 1 |
HP-UX. More... | |
#define | ELFOSABI_HPUX 1 |
HP-UX. More... | |
#define | ELFOSABI_NETBSD 2 |
NetBSD. More... | |
#define | ELFOSABI_LINUX 3 |
Linux. More... | |
#define | ELFOSABI_SOLARIS 6 |
Sun Solaris. More... | |
#define | ELFOSABI_AIX 7 |
IBM AIX. More... | |
#define | ELFOSABI_IRIX 8 |
SGI Irix. More... | |
#define | ELFOSABI_FREEBSD 9 |
FreeBSD. More... | |
#define | ELFOSABI_TRU64 10 |
Compaq TRU64 UNIX. More... | |
#define | ELFOSABI_MODESTO 11 |
Novell Modesto. More... | |
#define | ELFOSABI_OPENBSD 12 |
OpenBSD. More... | |
#define | ELFOSABI_ARM 97 |
ARM. | |
#define | ELFOSABI_STANDALONE 255 |
Standalone (embedded) application. | |
#define | ELFOSABI_STANDALONE 255 |
Standalone (embedded) application. | |
#define | EI_ABIVERSION 8 |
ABI version. | |
#define | EI_ABIVERSION 8 |
ABI version. | |
#define | EI_PAD 9 |
Byte index of padding bytes. More... | |
#define | EI_PAD 9 |
Byte index of padding bytes. More... | |
#define | ET_NONE 0 |
no file type | |
#define | ET_REL 1 |
relocatable file | |
#define | ET_EXEC 2 |
executable file | |
#define | ET_DYN 3 |
shared object file | |
#define | ET_CORE 4 |
core file | |
#define | ET_LOPROC 0xff00 |
processor-specific | |
#define | ET_HIPROC 0xffff |
processor-specific | |
#define | EM_NONE 0 |
no machine | |
#define | EM_M32 1 |
AT&T WE 32100. | |
#define | EM_SPARC 2 |
SPARC. | |
#define | EM_386 3 |
Intel 80386. | |
#define | EM_68K 4 |
Motorola 68000. | |
#define | EM_88K 5 |
Motorola 88000. | |
#define | EM_860 7 |
Intel 80860. | |
#define | EM_MIPS 8 |
MIPS RS3000 big-endian. | |
#define | EM_MIPS_RS4_BE 10 |
MIPS RS4000 big-endian. | |
#define | EM_SPARC64 11 |
SPARC 64-bit. | |
#define | EM_PARISC 15 |
HP PA-RISC. | |
#define | EM_VPP500 17 |
Fujitsu VPP500. | |
#define | EM_SPARC32PLUS 18 |
Sun's V8plus. | |
#define | EM_960 19 |
Intel 80960. | |
#define | EM_PPC 20 |
PowerPC. | |
#define | EM_V800 36 |
NEC V800. | |
#define | EM_FR20 37 |
Fujitsu FR20. | |
#define | EM_RH32 38 |
TRW RH-32. | |
#define | EM_RCE 39 |
Motorola RCE. | |
#define | EM_ARM 40 |
Advanced RISC Machines ARM. | |
#define | EM_ALPHA 41 |
Digital Alpha. | |
#define | EM_SH 42 |
Hitachi SuperH. | |
#define | EM_SPARCV9 43 |
SPARC v9 64-bit. | |
#define | EM_TRICORE 44 |
Siemens Tricore embedded processor. | |
#define | EM_ARC 45 |
Argonaut RISC Core, Argonaut Techn Inc. More... | |
#define | EM_H8_300 46 |
Hitachi H8/300. | |
#define | EM_H8_300H 47 |
Hitachi H8/300H. | |
#define | EM_H8S 48 |
Hitachi H8/S. | |
#define | EM_H8_500 49 |
Hitachi H8/500. | |
#define | EM_IA_64 50 |
HP/Intel IA-64. | |
#define | EM_MIPS_X 51 |
Stanford MIPS-X. | |
#define | EM_COLDFIRE 52 |
Motorola Coldfire. | |
#define | EM_68HC12 53 |
Motorola M68HC12. | |
#define | EM_X86_64 62 |
Advanced Micro Devices x86-64. | |
#define | EM_PDSP 63 |
Sony DSP Processor. | |
#define | EM_FX66 66 |
Siemens FX66 microcontroller. | |
#define | EM_ST9PLUS 67 |
STMicroelectronics ST9+ 8/16 mc. | |
#define | EM_ST7 68 |
STmicroelectronics ST7 8 bit mc. | |
#define | EM_68HC16 69 |
Motorola MC68HC16 microcontroller. | |
#define | EM_68HC11 70 |
Motorola MC68HC11 microcontroller. | |
#define | EM_68HC08 71 |
Motorola MC68HC08 microcontroller. | |
#define | EM_68HC05 72 |
Motorola MC68HC05 microcontroller. | |
#define | EM_SVX 73 |
Silicon Graphics SVx. | |
#define | EM_ST19 74 |
STMicroelectronics ST19 8 bit mc. | |
#define | EM_VAX 75 |
Digital VAX. | |
#define | EM_CRIS 76 |
Axis Communications 32-bit embedded processor. | |
#define | EM_JAVELIN 77 |
Infineon Technologies 32-bit embedded processor. | |
#define | EM_FIREPATH 78 |
Element 14 64-bit DSP Processor. | |
#define | EM_ZSP 79 |
LSI Logic 16-bit DSP Processor. | |
#define | EM_MMIX 80 |
Donald Knuth's educational 64-bit processor. | |
#define | EM_HUANY 81 |
Harvard University machine-independent object files. | |
#define | EM_PRISM 82 |
SiTera Prism. | |
#define | EM_AVR 83 |
Atmel AVR 8-bit microcontroller. | |
#define | EM_FR30 84 |
Fujitsu FR30. | |
#define | EM_D10V 85 |
Mitsubishi D10V. | |
#define | EM_D30V 86 |
Mitsubishi D30V. | |
#define | EM_V850 87 |
NEC v850. | |
#define | EM_M32R 88 |
Mitsubishi M32R. | |
#define | EM_MN10300 89 |
Matsushita MN10300. | |
#define | EM_MN10200 90 |
Matsushita MN10200. | |
#define | EM_PJ 91 |
picoJava | |
#define | EM_OPENRISC 92 |
OpenRISC 32-bit embedded processor. | |
#define | EM_ARC_A5 93 |
ARC Cores Tangent-A5. | |
#define | EM_XTENSA 94 |
Tensilica Xtensa Architecture. | |
#define | EM_ALTERA_NIOS2 113 |
Altera Nios II. | |
#define | EM_AARCH64 183 |
ARM AARCH64. | |
#define | EM_TILEPRO 188 |
Tilera TILEPro. | |
#define | EM_MICROBLAZE 189 |
Xilinx MicroBlaze. | |
#define | EM_TILEGX 191 |
Tilera TILE-Gx. | |
#define | EV_NONE 0 |
Invalid version. | |
#define | EV_CURRENT 1 |
Current version. | |
#define | EI_MAG0 0 |
file id | |
#define | EI_MAG1 1 |
file id | |
#define | EI_MAG2 2 |
file id | |
#define | EI_MAG3 3 |
file id | |
#define | ELFMAG0 0x7f |
e_ident[EI_MAG0] | |
#define | ELFMAG1 'E' |
e_ident[EI_MAG1] | |
#define | ELFMAG2 'L' |
e_ident[EI_MAG2] | |
#define | ELFMAG3 'F' |
e_ident[EI_MAG3] | |
#define | ELFCLASSS32 1 |
32-bit object | |
#define | ELFCLASSS64 2 |
64-bit object | |
#define | SHN_UNDEF 0 |
undefined section header entry | |
#define | SHN_LORESERVE 0xff00 |
lower bound of reserved indexes | |
#define | SHN_LOPROC 0xff00 |
lower bound of proc spec entr | |
#define | SHN_HIPROC 0xff1f |
upper bound of proc spec entr | |
#define | SHN_ABS 0xfff1 |
absolute values for ref | |
#define | SHN_COMMON 0xfff2 |
common symbols | |
#define | SHN_HIRESERVE 0xffff |
upper bound of reserved indexes | |
#define | SHT_INIT_ARRAY 14 |
Array of constructors. | |
#define | SHT_FINI_ARRAY 15 |
Array of destructors. | |
#define | SHT_PREINIT_ARRAY 16 |
Array of pre-constructors. | |
#define | SHT_GROUP 17 |
Section group. | |
#define | SHT_SYMTAB_SHNDX 18 |
Extended section indeces. | |
#define | SHT_NUM 19 |
Number of defined types. More... | |
#define | SHF_WRITE 0x1 |
writeable during execution | |
#define | SHF_ALLOC 0x2 |
section occupies virt memory | |
#define | SHF_EXECINSTR 0x4 |
code section | |
#define | SHF_MERGE 0x10 |
Might be merged. | |
#define | SHF_STRINGS 0x20 |
Contains nul-terminated strings. | |
#define | SHF_INFO_LINK 0x40 |
`sh_info' contains SHT index | |
#define | SHF_LINK_ORDER 0x80 |
Preserve order after combining. | |
#define | SHF_OS_NONCONFORMING 0x100 |
Non-standard OS specific handling required. | |
#define | SHF_GROUP 0x200 |
Section is member of a group. More... | |
#define | SHF_TLS 0x400 |
Section hold thread-local data. More... | |
#define | SHF_MASKOS 0x0ff00000 |
OS-specific. More... | |
#define | SHF_MASKPROC 0xf0000000 |
proc spec mask | |
#define | PT_NULL 0 |
array is unused | |
#define | PT_LOAD 1 |
loadable | |
#define | PT_DYNAMIC 2 |
dynamic linking information | |
#define | PT_INTERP 3 |
path to interpreter | |
#define | PT_NOTE 4 |
auxiliary information | |
#define | PT_SHLIB 5 |
reserved | |
#define | PT_PHDR 6 |
location of the pht itself | |
#define | PT_TLS 7 |
Thread-local storage segment. | |
#define | PT_NUM 8 |
Number of defined types. | |
#define | PT_LOOS 0x60000000 |
os spec. More... | |
#define | PT_HIOS 0x6fffffff |
os spec. More... | |
#define | PT_LOPROC 0x70000000 |
processor spec. More... | |
#define | PT_HIPROC 0x7fffffff |
processor spec. More... | |
#define | PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) |
EH frame information. More... | |
#define | PT_GNU_STACK (PT_LOOS + 0x474e551) |
Flags for stack. More... | |
#define | PT_GNU_RELRO (PT_LOOS + 0x474e552) |
Read only after reloc. More... | |
#define | PT_L4_STACK (PT_LOOS + 0x12) |
Address of the stack. More... | |
#define | PT_L4_KIP (PT_LOOS + 0x13) |
Address of the KIP. More... | |
#define | PT_L4_AUX (PT_LOOS + 0x14) |
Address of the AUX strcutures. More... | |
#define | NT_PRSTATUS 1 |
Contains copy of prstatus struct. | |
#define | NT_FPREGSET 2 |
Contains copy of fpregset struct. | |
#define | NT_PRPSINFO 3 |
Contains copy of prpsinfo struct. | |
#define | NT_PRXREG 4 |
Contains copy of prxregset struct. | |
#define | NT_TASKSTRUCT 4 |
Contains copy of task structure. | |
#define | NT_PLATFORM 5 |
String from sysinfo(SI_PLATFORM) | |
#define | NT_AUXV 6 |
Contains copy of auxv array. | |
#define | NT_GWINDOWS 7 |
Contains copy of gwindows struct. | |
#define | NT_ASRS 8 |
Contains copy of asrset struct. | |
#define | NT_PSTATUS 10 |
Contains copy of pstatus struct. | |
#define | NT_PSINFO 13 |
Contains copy of psinfo struct. | |
#define | NT_PRCRED 14 |
Contains copy of prcred struct. | |
#define | NT_UTSNAME 15 |
Contains copy of utsname struct. | |
#define | NT_LWPSTATUS 16 |
Contains copy of lwpstatus struct. | |
#define | NT_LWPSINFO 17 |
Contains copy of lwpinfo struct. | |
#define | NT_PRFPXREG 20 |
Contains copy of fprxregset struct. | |
#define | NT_VERSION 1 |
Contains a version string. More... | |
#define | DT_NULL 0 |
Dynamic Array Tags, d_tag - figure 2-10, page 2-12. More... | |
#define | DT_NEEDED 1 |
name of a needed library | |
#define | DT_PLTRELSZ 2 |
total size of relocation entry | |
#define | DT_PLTGOT 3 |
address assoc with prog link table | |
#define | DT_HASH 4 |
address of symbol hash table | |
#define | DT_STRTAB 5 |
address of string table | |
#define | DT_SYMTAB 6 |
address of symbol table | |
#define | DT_RELA 7 |
address of relocation table | |
#define | DT_RELASZ 8 |
total size of relocation table | |
#define | DT_RELAENT 9 |
size of DT_RELA relocation entry | |
#define | DT_STRSZ 10 |
size of the string table | |
#define | DT_SYMENT 11 |
size of a symbol table entry | |
#define | DT_INIT 12 |
address of initialization function | |
#define | DT_FINI 13 |
address of termination function | |
#define | DT_SONAME 14 |
name of the shared object | |
#define | DT_RPATH 15 |
search library path | |
#define | DT_SYMBOLIC 16 |
alter symbol resolution algorithm | |
#define | DT_REL 17 |
address of relocation table | |
#define | DT_RELSZ 18 |
total size of DT_REL relocation table | |
#define | DT_RELENT 19 |
size of the DT_REL relocation entry | |
#define | DT_PTRREL 20 |
type of relocation entry | |
#define | DT_DEBUG 21 |
for debugging purposes | |
#define | DT_TEXTREL 22 |
at least on entry changes r/o section | |
#define | DT_JMPREL 23 |
address of relocation entries | |
#define | DT_BIND_NOW 24 |
Process relocations of object. | |
#define | DT_INIT_ARRAY 25 |
Array with addresses of init fct. | |
#define | DT_FINI_ARRAY 26 |
Array with addresses of fini fct. | |
#define | DT_INIT_ARRAYSZ 27 |
Size in bytes of DT_INIT_ARRAY. | |
#define | DT_FINI_ARRAYSZ 28 |
Size in bytes of DT_FINI_ARRAY. | |
#define | DT_RUNPATH 29 |
Library search path. | |
#define | DT_FLAGS 30 |
Flags for the object being loaded. | |
#define | DT_ENCODING 32 |
Start of encoded range. | |
#define | DT_PREINIT_ARRAY 32 |
Array with addresses of preinit fct. | |
#define | DT_PREINIT_ARRAYSZ 33 |
size in bytes of DT_PREINIT_ARRAY | |
#define | DT_NUM 34 |
Number used. | |
#define | DT_LOOS 0x6000000d |
Start of OS-specific. | |
#define | DT_HIOS 0x6ffff000 |
End of OS-specific. | |
#define | DT_LOPROC 0x70000000 |
processor spec. More... | |
#define | DT_HIPROC 0x7fffffff |
processor spec. More... | |
#define | DF_ORIGIN 0x00000001 |
Object may use DF_ORIGIN. | |
#define | DF_SYMBOLIC 0x00000002 |
Symbol resolutions starts here. | |
#define | DF_TEXTREL 0x00000004 |
Object contains text relocations. | |
#define | DF_BIND_NOW 0x00000008 |
No lazy binding for this object. | |
#define | DF_STATIC_TLS 0x00000010 |
Module uses the static TLS model. | |
#define | DF_1_NOW 0x00000001 |
Set RTLD_NOW for this object. More... | |
#define | DF_1_GLOBAL 0x00000002 |
Set RTLD_GLOBAL for this object. More... | |
#define | DF_1_GROUP 0x00000004 |
Set RTLD_GROUP for this object. More... | |
#define | DF_1_NODELETE 0x00000008 |
Set RTLD_NODELETE for this object. More... | |
#define | DF_1_LOADFLTR 0x00000010 |
Trigger filtee loading at runtime. More... | |
#define | DF_1_INITFIRST 0x00000020 |
Set RTLD_INITFIRST for this object. | |
#define | DF_1_NOOPEN 0x00000040 |
Set RTLD_NOOPEN for this object. More... | |
#define | DF_1_ORIGIN 0x00000080 |
$ORIGIN must be handled. More... | |
#define | DF_1_DIRECT 0x00000100 |
Direct binding enabled. More... | |
#define | DF_1_INTERPOSE 0x00000400 |
Object is used to interpose. More... | |
#define | DF_1_NODEFLIB 0x00000800 |
Ignore default lib search path. More... | |
#define | DF_1_NODUMP 0x00001000 |
Object can't be dldump'ed. More... | |
#define | DF_1_CONFALT 0x00002000 |
Configuration alternative created. More... | |
#define | DF_1_ENDFILTEE 0x00004000 |
Filtee terminates filters search. More... | |
#define | DF_1_DISPRELDNE 0x00008000 |
Disp reloc applied at build time. More... | |
#define | DF_1_DISPRELPND 0x00010000 |
Disp reloc applied at run-time. More... | |
#define | DF_P1_LAZYLOAD 0x00000001 |
Lazyload following object. More... | |
#define | DF_P1_GROUPPERM 0x00000002 |
Symbols from next object are not generally available. More... | |
#define | R_386_NONE 0 |
none | |
#define | R_386_32 1 |
S + A. | |
#define | R_386_PC32 2 |
S + A - P. | |
#define | R_386_GOT32 3 |
G + A - P. | |
#define | R_386_PLT32 4 |
L + A - P. | |
#define | R_386_COPY 5 |
none | |
#define | R_386_GLOB_DAT 6 |
S. | |
#define | R_386_JMP_SLOT 7 |
S. | |
#define | R_386_RELATIVE 8 |
B + A. | |
#define | R_386_GOTOFF 9 |
S + A - GOT. | |
#define | R_386_GOTPC 10 |
GOT + A - P. | |
#define | STB_LOCAL 0 |
not visible outside object file | |
#define | STB_GLOBAL 1 |
visible to all objects beeing combined | |
#define | STB_WEAK 2 |
resemble global symbols | |
#define | STB_LOOS 10 |
os specific | |
#define | STB_HIOS 12 |
os specific | |
#define | STB_LOPROC 13 |
proc specific | |
#define | STB_HIPROC 15 |
proc specific | |
#define | STT_NOTYPE 0 |
symbol's type not specified | |
#define | STT_OBJECT 1 |
associated with a data object | |
#define | STT_FUNC 2 |
associated with a function or other code | |
#define | STT_SECTION 3 |
associated with a section | |
#define | STT_FILE 4 |
source file name associated with object | |
#define | STT_LOOS 10 |
os specific | |
#define | STT_HIOS 12 |
os specific | |
#define | STT_LOPROC 13 |
proc specific | |
#define | STT_HIPROC 15 |
proc specific | |
ELF types | |
typedef l4_uint32_t | Elf32_Addr |
size 4 align 4 | |
typedef l4_uint32_t | Elf32_Off |
size 4 align 4 | |
typedef l4_uint16_t | Elf32_Half |
size 2 align 2 | |
typedef l4_uint32_t | Elf32_Word |
size 4 align 4 | |
typedef l4_int32_t | Elf32_Sword |
size 4 align 4 | |
typedef l4_uint64_t | Elf64_Addr |
size 8 align 8 | |
typedef l4_uint64_t | Elf64_Off |
size 8 align 8 | |
typedef l4_uint16_t | Elf64_Half |
size 2 align 2 | |
typedef l4_uint32_t | Elf64_Word |
size 4 align 4 | |
typedef l4_int32_t | Elf64_Sword |
size 4 align 4 | |
typedef l4_uint64_t | Elf64_Xword |
size 8 align 8 | |
typedef l4_int64_t | Elf64_Sxword |
size 8 align 8 | |
Functions and types related to ELF binaries.
#define DF_1_CONFALT 0x00002000 |
#define DF_1_DISPRELDNE 0x00008000 |
#define DF_1_DISPRELPND 0x00010000 |
#define DF_1_ENDFILTEE 0x00004000 |
#define DF_1_GLOBAL 0x00000002 |
#define DF_1_INTERPOSE 0x00000400 |
#define DF_1_LOADFLTR 0x00000010 |
#define DF_1_NODEFLIB 0x00000800 |
#define DF_1_NODELETE 0x00000008 |
#define DF_1_NOOPEN 0x00000040 |
#define DF_P1_GROUPPERM 0x00000002 |
#define DT_NULL 0 |
#define EI_OSABI 7 |
#define EI_OSABI 7 |
#define EI_PAD 9 |
#define EI_PAD 9 |
#define EI_VERSION 6 |
#define EI_VERSION 6 |
#define ELFDATA2LSB 1 |
#define ELFDATA2LSB 1 |
#define ELFDATA2MSB 2 |
#define ELFDATA2MSB 2 |
#define ELFDATANONE 0 |
#define ELFDATANONE 0 |
#define ELFOSABI_SYSV 0 |
#define ELFOSABI_SYSV 0 |
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) |
#define PT_GNU_RELRO (PT_LOOS + 0x474e552) |
#define PT_L4_AUX (PT_LOOS + 0x14) |