Loading...
Searching...
No Matches
elf.h
Go to the documentation of this file.
/*
* (c) 2008-2009 Author(s)
* economic rights: Technische Universität Dresden (Germany)
* License: see LICENSE.spdx (in this directory or the directories above)
*/
/* (c) 2003-2006 Technische Universitaet Dresden
* License: see LICENSE.spdx (in this directory or the directories above) */
#pragma once
#include <l4/sys/l4int.h>
typedef l4_uint32_t Elf32_Addr;
typedef l4_uint32_t Elf32_Off;
typedef l4_uint16_t Elf32_Half;
typedef l4_uint32_t Elf32_Word;
typedef l4_int32_t Elf32_Sword;
typedef l4_uint64_t Elf64_Addr;
typedef l4_uint64_t Elf64_Off;
typedef l4_uint16_t Elf64_Half;
typedef l4_uint32_t Elf64_Word;
typedef l4_int32_t Elf64_Sword;
typedef l4_uint64_t Elf64_Xword;
typedef l4_int64_t Elf64_Sxword;
#if L4_MWORD_BITS == 64
# define ElfW(type) _ElfW(Elf, 64, type)
#else
# define ElfW(type) _ElfW(Elf, 32, type)
#endif
#define _ElfW(e,w,t) __ElfW(e, w, _##t)
#define __ElfW(e,w,t) e##w##t
#if defined(ARCH_x86)
# define L4_ARCH_EI_DATA ELFDATA2LSB
# define L4_ARCH_E_MACHINE EM_386
# define L4_ARCH_EI_CLASS ELFCLASS32
#elif defined(ARCH_amd64)
# define L4_ARCH_EI_DATA ELFDATA2LSB
# define L4_ARCH_E_MACHINE EM_X86_64
# define L4_ARCH_EI_CLASS ELFCLASS64
#elif defined(ARCH_arm)
# define L4_ARCH_EI_DATA ELFDATA2LSB
# define L4_ARCH_E_MACHINE EM_ARM
# define L4_ARCH_EI_CLASS ELFCLASS32
#elif defined(ARCH_arm64)
# define L4_ARCH_EI_DATA ELFDATA2LSB
# define L4_ARCH_E_MACHINE EM_AARCH64
# define L4_ARCH_EI_CLASS ELFCLASS64
#elif defined(ARCH_ppc32)
# define L4_ARCH_EI_DATA ELFDATA2MSB
# define L4_ARCH_E_MACHINE EM_PPC
# define L4_ARCH_EI_CLASS ELFCLASS32
#elif defined(ARCH_sparc)
# define L4_ARCH_EI_DATA ELFDATA2MSB
# define L4_ARCH_E_MACHINE EM_SPARC
# define L4_ARCH_EI_CLASS ELFCLASS32
#elif defined(ARCH_mips)
# define L4_ARCH_EI_DATA ELFDATA2LSB
# define L4_ARCH_E_MACHINE EM_MIPS
# ifdef __mips64
# define L4_ARCH_EI_CLASS ELFCLASS64
# else
# define L4_ARCH_EI_CLASS ELFCLASS32
# endif
#elif defined(ARCH_riscv)
# define L4_ARCH_EI_DATA ELFDATA2LSB
# define L4_ARCH_E_MACHINE EM_RISCV
# if __riscv_xlen == 64
# define L4_ARCH_EI_CLASS ELFCLASS64
# else
# define L4_ARCH_EI_CLASS ELFCLASS32
# endif
#else
# warning elf.h: Unsupported build architecture!
#endif
enum
{
EI_NIDENT = 16,
};
typedef struct
{
unsigned char e_ident[EI_NIDENT];
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
Elf32_Addr e_entry;
Elf32_Off e_phoff;
Elf32_Off e_shoff;
Elf32_Word e_flags;
Elf32_Half e_ehsize;
Elf32_Half e_phentsize;
Elf32_Half e_phnum;
Elf32_Half e_shentsize;
Elf32_Half e_shnum;
Elf32_Half e_shstrndx;
} Elf32_Ehdr;
typedef struct
{
unsigned char e_ident[EI_NIDENT];
Elf64_Half e_type;
Elf64_Half e_machine;
Elf64_Word e_version;
Elf64_Addr e_entry;
Elf64_Off e_phoff;
Elf64_Off e_shoff;
Elf64_Word e_flags;
Elf64_Half e_ehsize;
Elf64_Half e_phentsize;
Elf64_Half e_phnum;
Elf64_Half e_shentsize;
Elf64_Half e_shnum;
Elf64_Half e_shstrndx;
} Elf64_Ehdr;
enum Elf_ETs
{
ET_NONE = 0,
ET_REL = 1,
ET_EXEC = 2,
ET_DYN = 3,
ET_CORE = 4,
ET_LOPROC = 0xff00,
ET_HIPROC = 0xffff,
};
enum Elf_EMs
{
EM_NONE = 0,
EM_M32 = 1,
EM_SPARC = 2,
EM_386 = 3,
EM_68K = 4,
EM_88K = 5,
EM_860 = 7,
EM_MIPS = 8,
EM_MIPS_RS4_BE = 10,
EM_SPARC64 = 11,
EM_PARISC = 15,
EM_VPP500 = 17,
EM_SPARC32PLUS = 18,
EM_960 = 19,
EM_PPC = 20,
EM_V800 = 36,
EM_FR20 = 37,
EM_RH32 = 38,
EM_RCE = 39,
EM_ARM = 40,
EM_ALPHA = 41,
EM_SH = 42,
EM_SPARCV9 = 43,
EM_TRICORE = 44,
EM_ARC = 45,
EM_H8_300 = 46,
EM_H8_300H = 47,
EM_H8S = 48,
EM_H8_500 = 49,
EM_IA_64 = 50,
EM_MIPS_X = 51,
EM_COLDFIRE = 52,
EM_68HC12 = 53,
EM_X86_64 = 62,
EM_PDSP = 63,
EM_FX66 = 66,
EM_ST9PLUS = 67,
EM_ST7 = 68,
EM_68HC16 = 69,
EM_68HC11 = 70,
EM_68HC08 = 71,
EM_68HC05 = 72,
EM_SVX = 73,
EM_ST19 = 74,
EM_VAX = 75,
EM_CRIS = 76,
EM_JAVELIN = 77,
EM_FIREPATH = 78,
EM_ZSP = 79,
EM_MMIX = 80,
EM_HUANY = 81,
EM_PRISM = 82,
EM_AVR = 83,
EM_FR30 = 84,
EM_D10V = 85,
EM_D30V = 86,
EM_V850 = 87,
EM_M32R = 88,
EM_MN10300 = 89,
EM_MN10200 = 90,
EM_PJ = 91,
EM_OPENRISC = 92,
EM_ARC_A5 = 93,
EM_XTENSA = 94,
EM_ALTERA_NIOS2 = 113,
EM_AARCH64 = 183,
EM_TILEPRO = 188,
EM_MICROBLAZE = 189,
EM_TILEGX = 191,
EM_RISCV = 243,
EM_NUM = 244,
};
#if 0
#define EM_ALPHA 0x9026 /* interium value used by Linux until the
committee comes up with a final number */
#define EM_S390 0xA390 /* interium value used for IBM S390 */
#endif
enum Elf_EVs
{
EV_NONE = 0,
EV_CURRENT = 1,
};
enum Elf_EIs
{
EI_MAG0 = 0,
EI_MAG1 = 1,
EI_MAG2 = 2,
EI_MAG3 = 3,
EI_CLASS = 4,
EI_DATA = 5,
EI_VERSION = 6,
EI_OSABI = 7,
EI_ABIVERSION = 8,
EI_PAD = 9,
};
enum Elf_MAGs
{
ELFMAG0 = 0x7f,
ELFMAG1 = 'E',
ELFMAG2 = 'L',
ELFMAG3 = 'F',
};
enum Elf_ClASSs
{
ELFCLASSNONE = 0,
ELFCLASS32 = 1,
ELFCLASS64 = 2,
ELFCLASSNUM = 3,
};
enum Elf_DATAs
{
ELFDATANONE = 0,
ELFDATA2LSB = 1,
ELFDATA2MSB = 2,
ELFDATANUM = 3,
};
enum Elf_OSABIs
{
ELFOSABI_NONE = 0,
ELFOSABI_SYSV = 0,
ELFOSABI_HPUX = 1,
ELFOSABI_NETBSD = 2,
ELFOSABI_LINUX = 3,
ELFOSABI_SOLARIS = 6,
ELFOSABI_AIX = 7,
ELFOSABI_IRIX = 8,
ELFOSABI_FREEBSD = 9,
ELFOSABI_TRU64 = 10,
ELFOSABI_MODESTO = 11,
ELFOSABI_OPENBSD = 12,
ELFOSABI_ARM = 97,
ELFOSABI_STANDALONE = 255,
};
enum Elf_SHNs
{
SHN_UNDEF = 0,
SHN_LORESERVE = 0xff00,
SHN_LOPROC = 0xff00,
SHN_HIPROC = 0xff1f,
SHN_ABS = 0xfff1,
SHN_COMMON = 0xfff2,
SHN_HIRESERVE = 0xffff,
};
typedef struct
{
Elf32_Word sh_name;
Elf32_Word sh_type;
Elf32_Word sh_flags;
Elf32_Addr sh_addr;
Elf32_Off sh_offset;
Elf32_Word sh_size;
Elf32_Word sh_link;
Elf32_Word sh_info;
Elf32_Word sh_addralign;
Elf32_Word sh_entsize;
} Elf32_Shdr;
typedef struct
{
Elf64_Word sh_name;
Elf64_Word sh_type;
Elf64_Xword sh_flags;
Elf64_Addr sh_addr;
Elf64_Off sh_offset;
Elf64_Xword sh_size;
Elf64_Word sh_link;
Elf64_Word sh_info;
Elf64_Xword sh_addralign;
Elf64_Xword sh_entsize;
} Elf64_Shdr;
enum Elf_SHTs
{
SHT_NULL = 0,
SHT_PROGBITS = 1,
SHT_SYMTAB = 2,
SHT_STRTAB = 3,
SHT_RELA = 4,
SHT_HASH = 5,
SHT_DYNAMIC = 6,
SHT_NOTE = 7,
SHT_NOBITS = 8,
SHT_REL = 9,
SHT_SHLIB = 10,
SHT_DYNSYM = 11,
SHT_INIT_ARRAY = 14,
SHT_FINI_ARRAY = 15,
SHT_PREINIT_ARRAY = 16,
SHT_GROUP = 17,
SHT_SYMTAB_SHNDX = 18,
SHT_NUM = 19,
SHT_LOOS = 0x60000000,
SHT_HIOS = 0x6fffffff,
SHT_LOPROC = 0x70000000,
SHT_HIPROC = 0x7fffffff,
SHT_LOUSER = 0x80000000,
SHT_HIUSER = 0xffffffff,
};
enum Elf_SHFs
{
SHF_WRITE = 0x1,
SHF_ALLOC = 0x2,
SHF_EXECINSTR = 0x4,
SHF_MERGE = 0x10,
SHF_STRINGS = 0x20,
SHF_INFO_LINK = 0x40,
SHF_LINK_ORDER = 0x80,
SHF_OS_NONCONFORMING = 0x100,
SHF_GROUP = 0x200,
SHF_TLS = 0x400,
SHF_MASKOS = 0x0ff00000,
SHF_MASKPROC = 0xf0000000,
};
typedef struct
{
Elf32_Word p_type;
Elf32_Off p_offset;
Elf32_Addr p_vaddr;
Elf32_Addr p_paddr;
Elf32_Word p_filesz;
Elf32_Word p_memsz;
Elf32_Word p_flags;
Elf32_Word p_align;
} Elf32_Phdr;
typedef struct
{
Elf64_Word p_type;
Elf64_Word p_flags;
Elf64_Off p_offset;
Elf64_Addr p_vaddr;
Elf64_Addr p_paddr;
Elf64_Xword p_filesz;
Elf64_Xword p_memsz;
Elf64_Xword p_align;
} Elf64_Phdr;
enum Elf_PTs
{
PT_NULL = 0,
PT_LOAD = 1,
PT_DYNAMIC = 2,
PT_INTERP = 3,
PT_NOTE = 4,
PT_SHLIB = 5,
PT_PHDR = 6,
PT_TLS = 7,
PT_NUM = 8,
PT_LOOS = 0x60000000,
PT_HIOS = 0x6fffffff,
PT_LOPROC = 0x70000000,
PT_HIPROC = 0x7fffffff,
PT_GNU_EH_FRAME = PT_LOOS + 0x474e550,
PT_GNU_STACK = PT_LOOS + 0x474e551,
PT_GNU_RELRO = PT_LOOS + 0x474e552,
PT_L4_STACK = PT_LOOS + 0x12,
PT_L4_AUX = PT_LOOS + 0x14,
};
enum ELF_PFs
{
PF_X = 0x1,
PF_W = 0x2,
PF_R = 0x4,
PF_MASKOS = 0x0ff00000,
PF_MASKPROC = 0x7fffffff,
};
enum Elf_NTs_core
{
NT_PRSTATUS = 1,
NT_FPREGSET = 2,
NT_PRPSINFO = 3,
NT_PRXREG = 4,
NT_TASKSTRUCT = 4,
NT_PLATFORM = 5,
NT_AUXV = 6,
NT_GWINDOWS = 7,
NT_ASRS = 8,
NT_PSTATUS = 10,
NT_PSINFO = 13,
NT_PRCRED = 14,
NT_UTSNAME = 15,
NT_LWPSTATUS = 16,
NT_LWPSINFO = 17,
NT_PRFPXREG = 20,
};
enum Elf_NTs_obj
{
NT_VERSION = 1,
};
typedef struct
{
Elf32_Sword d_tag;
union
{
Elf32_Word d_val;
Elf32_Addr d_ptr;
} d_un;
} Elf32_Dyn;
typedef struct
{
Elf64_Sxword d_tag;
union
{
Elf64_Xword d_val;
Elf64_Addr d_ptr;
} d_un;
} Elf64_Dyn;
enum Elf_DTs
{
DT_NULL = 0,
DT_NEEDED = 1,
DT_PLTRELSZ = 2,
DT_PLTGOT = 3,
DT_HASH = 4,
DT_STRTAB = 5,
DT_SYMTAB = 6,
DT_RELA = 7,
DT_RELASZ = 8,
DT_RELAENT = 9,
DT_STRSZ = 10,
DT_SYMENT = 11,
DT_INIT = 12,
DT_FINI = 13,
DT_SONAME = 14,
DT_RPATH = 15,
DT_SYMBOLIC = 16,
DT_REL = 17,
DT_RELSZ = 18,
DT_RELENT = 19,
DT_PTRREL = 20,
DT_DEBUG = 21,
DT_TEXTREL = 22,
DT_JMPREL = 23,
DT_BIND_NOW = 24,
DT_INIT_ARRAY = 25,
DT_FINI_ARRAY = 26,
DT_INIT_ARRAYSZ = 27,
DT_FINI_ARRAYSZ = 28,
DT_RUNPATH = 29,
DT_FLAGS = 30,
DT_ENCODING = 32,
DT_PREINIT_ARRAY = 32,
DT_PREINIT_ARRAYSZ = 33,
DT_NUM = 34,
DT_LOOS = 0x6000000d,
DT_HIOS = 0x6ffff000,
DT_LOPROC = 0x70000000,
DT_HIPROC = 0x7fffffff,
};
enum Elf_DFs
{
DF_ORIGIN = 0x00000001,
DF_SYMBOLIC = 0x00000002,
DF_TEXTREL = 0x00000004,
DF_BIND_NOW = 0x00000008,
DF_STATIC_TLS = 0x00000010,
};
enum Elf_DF_1s
{
DF_1_NOW = 0x00000001,
DF_1_GLOBAL = 0x00000002,
DF_1_GROUP = 0x00000004,
DF_1_NODELETE = 0x00000008,
DF_1_LOADFLTR = 0x00000010,
DF_1_INITFIRST = 0x00000020,
DF_1_NOOPEN = 0x00000040,
DF_1_ORIGIN = 0x00000080,
DF_1_DIRECT = 0x00000100,
DF_1_TRANS = 0x00000200,
DF_1_INTERPOSE = 0x00000400,
DF_1_NODEFLIB = 0x00000800,
DF_1_NODUMP = 0x00001000,
DF_1_CONFALT = 0x00002000,
DF_1_ENDFILTEE = 0x00004000,
DF_1_DISPRELDNE = 0x00008000,
DF_1_DISPRELPND = 0x00010000,
};
enum Elf_DTF_1s
{
DTF_1_PARINIT = 0x00000001,
DTF_1_CONFEXP = 0x00000002,
};
enum Elf_DF_P1s
{
DF_P1_LAZYLOAD = 0x00000001,
DF_P1_GROUPPERM = 0x00000002,
};
typedef struct
{
Elf32_Addr r_offset;
Elf32_Word r_info;
} Elf32_Rel;
typedef struct
{
Elf32_Addr r_offset;
Elf32_Word r_info;
Elf32_Sword r_addend;
} Elf32_Rela;
typedef struct
{
Elf64_Addr r_offset;
Elf64_Xword r_info;
} Elf64_Rel;
typedef struct
{
Elf64_Addr r_offset;
Elf64_Xword r_info;
Elf64_Sxword r_addend;
} Elf64_Rela;
#define ELF32_R_SYM(i) ((i)>>8)
#define ELF32_R_TYPE(i) ((unsigned char)(i))
#define ELF32_R_INFO(s,t) (((s)<<8)+(unsigned char)(t))
#define ELF64_R_SYM(i) ((i)>>32)
#define ELF64_R_TYPE(i) ((i)&0xffffffffL)
#define ELF64_R_INFO(s,t) (((s)<<32)+(t)&0xffffffffL)
enum Elf_R_386_s
{
R_386_NONE = 0,
R_386_32 = 1,
R_386_PC32 = 2,
R_386_GOT32 = 3,
R_386_PLT32 = 4,
R_386_COPY = 5,
R_386_GLOB_DAT = 6,
R_386_JMP_SLOT = 7,
R_386_RELATIVE = 8,
R_386_GOTOFF = 9,
R_386_GOTPC = 10,
R_386_32PLT = 11,
R_386_TLS_TPOFF = 14,
R_386_TLS_IE = 15,
R_386_TLS_GOTIE = 16,
R_386_TLS_LE = 17,
R_386_TLS_GD = 18,
R_386_TLS_LDM = 19,
R_386_16 = 20,
R_386_PC16 = 21,
R_386_8 = 22,
R_386_PC8 = 23,
R_386_TLS_GD_32 = 24,
R_386_TLS_GD_PUSH = 25,
R_386_TLS_GD_CALL = 26,
R_386_TLS_GD_POP = 27,
R_386_TLS_LDM_32 = 28,
R_386_TLS_LDM_PUSH = 29,
R_386_TLS_LDM_CALL = 30,
R_386_TLS_LDM_POP = 31,
R_386_TLS_LDO_32 = 32,
R_386_TLS_IE_32 = 33,
R_386_TLS_LE_32 = 34,
R_386_TLS_DTPMOD32 = 35,
R_386_TLS_DTPOFF32 = 36,
R_386_TLS_TPOFF32 = 37,
R_386_NUM = 38,
};
enum Elf_EF_ARM_s
{
EF_ARM_RELEXEC = 0x01,
EF_ARM_HASENTRY = 0x02,
EF_ARM_INTERWORK = 0x04,
EF_ARM_APCS_26 = 0x08,
EF_ARM_APCS_FLOAT = 0x10,
EF_ARM_PIC = 0x20,
EF_ARM_ALIGN8 = 0x40,
EF_ARM_NEW_ABI = 0x80,
EF_ARM_OLD_ABI = 0x100,
/* Other constants defined in the ARM ELF spec. version B-01. */
/* NB. These conflict with values defined above. */
EF_ARM_SYMSARESORTED = 0x04,
EF_ARM_DYNSYMSUSESEGIDX = 0x08,
EF_ARM_MAPSYMSFIRST = 0x10,
EF_ARM_EABIMASK = 0XFF000000,
#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
EF_ARM_EABI_UNKNOWN = 0x00000000,
EF_ARM_EABI_VER1 = 0x01000000,
EF_ARM_EABI_VER2 = 0x02000000,
};
enum Elf_STT_ARM_s
{
STT_ARM_TFUNC = 0xd,
};
enum Elf_SHF_s_ARM
{
SHF_ARM_ENTRYSECT = 0x10000000,
SHF_ARM_COMDEF = 0x80000000,
};
enum Elf_ARM_SBs
{
PF_ARM_SB = 0x10000000,
};
enum Elf_R_ARM_s
{
R_ARM_NONE = 0,
R_ARM_PC24 = 1,
R_ARM_ABS32 = 2,
R_ARM_REL32 = 3,
R_ARM_PC13 = 4,
R_ARM_ABS16 = 5,
R_ARM_ABS12 = 6,
R_ARM_THM_ABS5 = 7,
R_ARM_ABS8 = 8,
R_ARM_SBREL32 = 9,
R_ARM_THM_PC22 = 10,
R_ARM_THM_PC8 = 11,
R_ARM_AMP_VCALL9 = 12,
R_ARM_SWI24 = 13,
R_ARM_THM_SWI8 = 14,
R_ARM_XPC25 = 15,
R_ARM_THM_XPC22 = 16,
R_ARM_COPY = 20,
R_ARM_GLOB_DAT = 21,
R_ARM_JUMP_SLOT = 22,
R_ARM_RELATIVE = 23,
R_ARM_GOTOFF = 24,
R_ARM_GOTPC = 25,
R_ARM_GOT32 = 26,
R_ARM_PLT32 = 27,
R_ARM_ALU_PCREL_7_0 = 32,
R_ARM_ALU_PCREL_15_8 = 33,
R_ARM_ALU_PCREL_23_15 = 34,
R_ARM_LDR_SBREL_11_0 = 35,
R_ARM_ALU_SBREL_19_12 = 36,
R_ARM_ALU_SBREL_27_20 = 37,
R_ARM_GNU_VTENTRY = 100,
R_ARM_GNU_VTINHERIT = 101,
R_ARM_THM_PC11 = 102,
R_ARM_THM_PC9 = 103,
R_ARM_RXPC25 = 249,
R_ARM_RSBREL32 = 250,
R_ARM_THM_RPC22 = 251,
R_ARM_RREL32 = 252,
R_ARM_RABS22 = 253,
R_ARM_RPC24 = 254,
R_ARM_RBASE = 255,
R_ARM_NUM = 256,
};
enum Elf_R_AARCH64_s
{
R_AARCH64_NONE = 0,
R_AARCH64_RELATIVE = 1027,
};
enum Elf_R_X86_64_s
{
R_X86_64_NONE = 0,
R_X86_64_64 = 1,
R_X86_64_PC32 = 2,
R_X86_64_GOT32 = 3,
R_X86_64_PLT32 = 4,
R_X86_64_COPY = 5,
R_X86_64_GLOB_DAT = 6,
R_X86_64_JUMP_SLOT = 7,
R_X86_64_RELATIVE = 8,
R_X86_64_GOTPCREL = 9,
R_X86_64_32 = 10,
R_X86_64_32S = 11,
R_X86_64_16 = 12,
R_X86_64_PC16 = 13,
R_X86_64_8 = 14,
R_X86_64_PC8 = 15,
R_X86_64_DTPMOD64 = 16,
R_X86_64_DTPOFF64 = 17,
R_X86_64_TPOFF64 = 18,
R_X86_64_TLSGD = 19,
R_X86_64_TLSLD = 20,
R_X86_64_DTPOFF32 = 21,
R_X86_64_GOTTPOFF = 22,
R_X86_64_TPOFF32 = 23,
R_X86_64_NUM = 24,
};
enum Elf_STNs
{
STN_UNDEF = 0,
};
typedef struct
{
Elf32_Word st_name;
Elf32_Addr st_value;
Elf32_Word st_size;
unsigned char st_info;
unsigned char st_other;
Elf32_Half st_shndx;
} Elf32_Sym;
typedef struct
{
Elf64_Word st_name;
unsigned char st_info;
unsigned char st_other;
Elf64_Half st_shndx;
Elf64_Addr st_value;
Elf64_Xword st_size;
} Elf64_Sym;
#define ELF32_ST_BIND(i) ((i)>>4)
#define ELF32_ST_TYPE(i) ((i)&0xf)
#define ELF32_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
#define ELF64_ST_BIND(i) ((i)>>4)
#define ELF64_ST_TYPE(i) ((i)&0xf)
#define ELF64_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
enum Elf_STBs
{
STB_LOCAL = 0,
STB_GLOBAL = 1,
STB_WEAK = 2,
STB_LOOS = 10,
STB_HIOS = 12,
STB_LOPROC = 13,
STB_HIPROC = 15,
};
enum Elf_STTs
{
STT_NOTYPE = 0,
STT_OBJECT = 1,
STT_FUNC = 2,
STT_SECTION = 3,
STT_FILE = 4,
STT_LOOS = 10,
STT_HIOS = 12,
STT_LOPROC = 13,
STT_HIPROC = 15,
};
enum Elf_ATs
{
AT_NULL = 0,
AT_IGNORE = 1,
AT_EXECFD = 2,
AT_PHDR = 3,
AT_PHENT = 4,
AT_PHNUM = 5,
AT_PAGESZ = 6,
AT_BASE = 7,
AT_FLAGS = 8,
AT_ENTRY = 9,
AT_NOTELF = 10,
AT_UID = 11,
AT_EUID = 12,
AT_GID = 13,
AT_EGID = 14,
AT_L4_AUX = 0xf0,
AT_L4_ENV = 0xf1,
};
typedef struct Elf32_Auxv
{
Elf32_Word atype;
Elf32_Word avalue;
} Elf32_Auxv;
typedef struct Elf64_Auxv
{
Elf64_Word atype;
Elf64_Word avalue;
} Elf64_Auxv;
typedef struct
{
Elf32_Word n_namesz;
Elf32_Word n_descsz;
Elf32_Word n_type;
} Elf32_Nhdr;
typedef struct
{
Elf64_Word n_namesz;
Elf64_Word n_descsz;
Elf64_Word n_type;
} Elf64_Nhdr;
static inline int l4util_elf_check_magic(ElfW(Ehdr) const *hdr);
static inline int l4util_elf_check_arch(ElfW(Ehdr) const *hdr);
static inline ElfW(Phdr) *l4util_elf_phdr(ElfW(Ehdr) const *hdr);
/* Implementations */
static inline
int l4util_elf_check_magic(ElfW(Ehdr) const *hdr)
{
return hdr->e_ident[EI_MAG0] == ELFMAG0
&& hdr->e_ident[EI_MAG1] == ELFMAG1
&& hdr->e_ident[EI_MAG2] == ELFMAG2
&& hdr->e_ident[EI_MAG3] == ELFMAG3;
}
static inline
int l4util_elf_check_arch(ElfW(Ehdr) const *hdr)
{
return hdr->e_ident[EI_CLASS] == L4_ARCH_EI_CLASS
&& hdr->e_ident[EI_DATA] == L4_ARCH_EI_DATA
&& hdr->e_machine == L4_ARCH_E_MACHINE;
}
static inline
ElfW(Phdr) *l4util_elf_phdr(ElfW(Ehdr) const *hdr)
{
return (ElfW(Phdr) *)((char *)hdr + hdr->e_phoff);
}
l4_int32_t
signed int l4_int32_t
Signed 32bit value.
Definition l4int.h:28
l4_int64_t
signed long long l4_int64_t
Signed 64bit value.
Definition l4int.h:30
l4_uint32_t
unsigned int l4_uint32_t
Unsigned 32bit value.
Definition l4int.h:29
l4_uint16_t
unsigned short int l4_uint16_t
Unsigned 16bit value.
Definition l4int.h:27
l4_uint64_t
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
Elf64_Addr
l4_uint64_t Elf64_Addr
size 8 align 8
Definition elf.h:47
Elf_DATAs
Elf_DATAs
Data encoding.
Definition elf.h:308
Elf_R_X86_64_s
Elf_R_X86_64_s
AMD x86-64 relocations.
Definition elf.h:833
Elf_ClASSs
Elf_ClASSs
File class or capacity.
Definition elf.h:299
Elf_PTs
Elf_PTs
Segment types.
Definition elf.h:452
Elf_ETs
Elf_ETs
Object file type.
Definition elf.h:169
Elf_STT_ARM_s
Elf_STT_ARM_s
Additional symbol types for Thumb.
Definition elf.h:757
Elf_OSABIs
Elf_OSABIs
Identify operating system and ABI to which the object is targeted.
Definition elf.h:317
Elf64_Half
l4_uint16_t Elf64_Half
size 2 align 2
Definition elf.h:49
Elf_STNs
Elf_STNs
Symbol Table Entry.
Definition elf.h:866
Elf_DTs
Elf_DTs
Dynamic Array Tags.
Definition elf.h:536
Elf_DF_1s
Elf_DF_1s
State flags selectable in the Elf32_Dyn.d_un.d_val / Elf64_Dyn.d_un.d_val element of the DT_FLAGS_1 e...
Definition elf.h:595
Elf32_Half
l4_uint16_t Elf32_Half
size 2 align 2
Definition elf.h:44
Elf_MAGs
Elf_MAGs
Magic number.
Definition elf.h:290
Elf_NTs_core
Elf_NTs_core
Legal values for note segment descriptor types for core files.
Definition elf.h:487
Elf_R_AARCH64_s
Elf_R_AARCH64_s
AARCH64 relocations.
Definition elf.h:826
Elf32_Word
l4_uint32_t Elf32_Word
size 4 align 4
Definition elf.h:45
Elf64_Sword
l4_int32_t Elf64_Sword
size 4 align 4
Definition elf.h:51
Elf_ARM_SBs
Elf_ARM_SBs
ARM-specific program header flags.
Definition elf.h:771
Elf_STTs
Elf_STTs
Symbol Types.
Definition elf.h:926
Elf_EIs
Elf_EIs
Identification Indices.
Definition elf.h:275
Elf_EF_ARM_s
Elf_EF_ARM_s
ARM specific declarations.
Definition elf.h:731
Elf_EVs
Elf_EVs
Object file version.
Definition elf.h:267
Elf32_Sword
l4_int32_t Elf32_Sword
size 4 align 4
Definition elf.h:46
Elf32_Addr
l4_uint32_t Elf32_Addr
size 4 align 4
Definition elf.h:42
ELF_PFs
ELF_PFs
Segment permissions.
Definition elf.h:477
Elf_SHTs
Elf_SHTs
Section type.
Definition elf.h:378
Elf32_Off
l4_uint32_t Elf32_Off
size 4 align 4
Definition elf.h:43
Elf_SHNs
Elf_SHNs
Special section indexes.
Definition elf.h:336
Elf_DTF_1s
Elf_DTF_1s
Flags for the feature selection in DT_FEATURE_1.
Definition elf.h:617
Elf_DF_P1s
Elf_DF_P1s
Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry.
Definition elf.h:624
Elf_SHFs
Elf_SHFs
Section attribute flags.
Definition elf.h:407
Elf_ATs
Elf_ATs
Legal values for Elf32_Auxv.atype / Elf64_Auxv.atype.
Definition elf.h:940
Elf_R_386_s
Elf_R_386_s
Relocation types (processor specific).
Definition elf.h:678
Elf64_Off
l4_uint64_t Elf64_Off
size 8 align 8
Definition elf.h:48
Elf64_Xword
l4_uint64_t Elf64_Xword
size 8 align 8
Definition elf.h:52
Elf_EMs
Elf_EMs
Required architecture.
Definition elf.h:184
Elf64_Word
l4_uint32_t Elf64_Word
size 4 align 4
Definition elf.h:50
Elf64_Sxword
l4_int64_t Elf64_Sxword
size 8 align 8
Definition elf.h:53
Elf_NTs_obj
Elf_NTs_obj
Legal values for the note segment descriptor types for object files.
Definition elf.h:508
Elf_STBs
Elf_STBs
Symbol Binding.
Definition elf.h:913
Elf_DFs
Elf_DFs
Values of Elf32_Dyn.d_un.d_val, Elf64_Dyn.d_un.d_val in the DT_FLAGS entry.
Definition elf.h:582
ElfW
#define ElfW(type)
Use 64 or 32 bits types depending on the target architecture.
Definition elf.h:63
Elf_SHF_s_ARM
Elf_SHF_s_ARM
ARM-specific values for Elf32_Shdr.sh_flags / Elf64_Shdr.sh_flags.
Definition elf.h:763
Elf_R_ARM_s
Elf_R_ARM_s
ARM relocations.
Definition elf.h:778
ELFDATA2MSB
@ ELFDATA2MSB
0x01020304 => [ 0x01|0x02|0x03|0x04 ]
Definition elf.h:311
ELFDATA2LSB
@ ELFDATA2LSB
0x01020304 => [ 0x04|0x03|0x02|0x01 ]
Definition elf.h:310
ELFDATANUM
@ ELFDATANUM
Mask for valid data encoding.
Definition elf.h:312
ELFDATANONE
@ ELFDATANONE
invalid data encoding
Definition elf.h:309
R_X86_64_RELATIVE
@ R_X86_64_RELATIVE
Adjust by program base.
Definition elf.h:842
R_X86_64_GLOB_DAT
@ R_X86_64_GLOB_DAT
Create GOT entry.
Definition elf.h:840
R_X86_64_COPY
@ R_X86_64_COPY
Copy symbol at runtime.
Definition elf.h:839
R_X86_64_GOTTPOFF
@ R_X86_64_GOTTPOFF
32 bit signed PC relative offset to GOT entry for IE symbol
Definition elf.h:858
R_X86_64_32
@ R_X86_64_32
Direct 32 bit zero extended.
Definition elf.h:844
R_X86_64_TPOFF32
@ R_X86_64_TPOFF32
Offset in initial TLS block.
Definition elf.h:860
R_X86_64_GOTPCREL
@ R_X86_64_GOTPCREL
32 bit signed PC relative offset to GOT
Definition elf.h:843
R_X86_64_TLSGD
@ R_X86_64_TLSGD
32 bit signed PC relative offset to two GOT entries for GD symbol
Definition elf.h:853
R_X86_64_64
@ R_X86_64_64
Direct 64 bit.
Definition elf.h:835
R_X86_64_DTPOFF64
@ R_X86_64_DTPOFF64
Offset in module's TLS block.
Definition elf.h:851
R_X86_64_32S
@ R_X86_64_32S
Direct 32 bit sign extended.
Definition elf.h:845
R_X86_64_TPOFF64
@ R_X86_64_TPOFF64
Offset in initial TLS block.
Definition elf.h:852
R_X86_64_GOT32
@ R_X86_64_GOT32
32 bit GOT entry
Definition elf.h:837
R_X86_64_PC16
@ R_X86_64_PC16
16 bit sign extended pc relative
Definition elf.h:847
R_X86_64_NONE
@ R_X86_64_NONE
No reloc.
Definition elf.h:834
R_X86_64_TLSLD
@ R_X86_64_TLSLD
32 bit signed PC relative offset to two GOT entries for LD symbol
Definition elf.h:855
R_X86_64_PC8
@ R_X86_64_PC8
8 bit sign extended pc relative
Definition elf.h:849
R_X86_64_JUMP_SLOT
@ R_X86_64_JUMP_SLOT
Create PLT entry.
Definition elf.h:841
R_X86_64_PC32
@ R_X86_64_PC32
PC relative 32 bit signed.
Definition elf.h:836
R_X86_64_8
@ R_X86_64_8
Direct 8 bit sign extended.
Definition elf.h:848
R_X86_64_DTPOFF32
@ R_X86_64_DTPOFF32
Offset in TLS block.
Definition elf.h:857
R_X86_64_DTPMOD64
@ R_X86_64_DTPMOD64
ID of module containing symbol.
Definition elf.h:850
R_X86_64_PLT32
@ R_X86_64_PLT32
32 bit PLT address
Definition elf.h:838
R_X86_64_16
@ R_X86_64_16
Direct 16 bit zero extended.
Definition elf.h:846
ELFCLASS64
@ ELFCLASS64
64-bit object
Definition elf.h:302
ELFCLASS32
@ ELFCLASS32
32-bit object
Definition elf.h:301
ELFCLASSNUM
@ ELFCLASSNUM
Mask for 32-bit or 64-bit class.
Definition elf.h:303
ELFCLASSNONE
@ ELFCLASSNONE
Invalid class.
Definition elf.h:300
PT_LOPROC
@ PT_LOPROC
processor-specific
Definition elf.h:464
PT_HIOS
@ PT_HIOS
OS-specific.
Definition elf.h:463
PT_SHLIB
@ PT_SHLIB
reserved
Definition elf.h:458
PT_PHDR
@ PT_PHDR
location of the pht itself
Definition elf.h:459
PT_TLS
@ PT_TLS
Thread-local storage segment.
Definition elf.h:460
PT_HIPROC
@ PT_HIPROC
processor-specific
Definition elf.h:465
PT_GNU_RELRO
@ PT_GNU_RELRO
Read only after reloc.
Definition elf.h:469
PT_GNU_STACK
@ PT_GNU_STACK
Flags for stack.
Definition elf.h:468
PT_NULL
@ PT_NULL
array is unused
Definition elf.h:453
PT_LOOS
@ PT_LOOS
OS-specific.
Definition elf.h:462
PT_NUM
@ PT_NUM
Number of defined types.
Definition elf.h:461
PT_L4_AUX
@ PT_L4_AUX
Address of the AUX structures.
Definition elf.h:472
PT_L4_STACK
@ PT_L4_STACK
Address of the stack.
Definition elf.h:471
PT_GNU_EH_FRAME
@ PT_GNU_EH_FRAME
EH frame information.
Definition elf.h:467
PT_DYNAMIC
@ PT_DYNAMIC
dynamic linking information
Definition elf.h:455
PT_NOTE
@ PT_NOTE
auxiliary information
Definition elf.h:457
PT_INTERP
@ PT_INTERP
path to interpreter
Definition elf.h:456
PT_LOAD
@ PT_LOAD
loadable
Definition elf.h:454
ET_NONE
@ ET_NONE
no file type
Definition elf.h:170
ET_REL
@ ET_REL
relocatable file
Definition elf.h:171
ET_DYN
@ ET_DYN
shared object file
Definition elf.h:173
ET_HIPROC
@ ET_HIPROC
processor-specific
Definition elf.h:176
ET_LOPROC
@ ET_LOPROC
processor-specific
Definition elf.h:175
ET_CORE
@ ET_CORE
core file
Definition elf.h:174
ET_EXEC
@ ET_EXEC
executable file
Definition elf.h:172
ELFOSABI_LINUX
@ ELFOSABI_LINUX
Linux.
Definition elf.h:322
ELFOSABI_TRU64
@ ELFOSABI_TRU64
Compaq TRU64 UNIX.
Definition elf.h:327
ELFOSABI_HPUX
@ ELFOSABI_HPUX
HP-UX.
Definition elf.h:320
ELFOSABI_NETBSD
@ ELFOSABI_NETBSD
NetBSD.
Definition elf.h:321
ELFOSABI_IRIX
@ ELFOSABI_IRIX
SGI Irix.
Definition elf.h:325
ELFOSABI_ARM
@ ELFOSABI_ARM
ARM.
Definition elf.h:330
ELFOSABI_STANDALONE
@ ELFOSABI_STANDALONE
Standalone (embedded) application.
Definition elf.h:331
ELFOSABI_SYSV
@ ELFOSABI_SYSV
Alias.
Definition elf.h:319
ELFOSABI_OPENBSD
@ ELFOSABI_OPENBSD
OpenBSD.
Definition elf.h:329
ELFOSABI_NONE
@ ELFOSABI_NONE
UNIX System V ABI.
Definition elf.h:318
ELFOSABI_AIX
@ ELFOSABI_AIX
IBM AIX.
Definition elf.h:324
ELFOSABI_SOLARIS
@ ELFOSABI_SOLARIS
Sun Solaris.
Definition elf.h:323
ELFOSABI_FREEBSD
@ ELFOSABI_FREEBSD
FreeBSD.
Definition elf.h:326
ELFOSABI_MODESTO
@ ELFOSABI_MODESTO
Novell Modesto.
Definition elf.h:328
DT_SYMENT
@ DT_SYMENT
size of a symbol table entry
Definition elf.h:548
DT_FINI_ARRAYSZ
@ DT_FINI_ARRAYSZ
Size in bytes of DT_FINI_ARRAY.
Definition elf.h:565
DT_SYMBOLIC
@ DT_SYMBOLIC
alter symbol resolution algorithm
Definition elf.h:553
DT_PREINIT_ARRAYSZ
@ DT_PREINIT_ARRAYSZ
size in bytes of DT_PREINIT_ARRAY
Definition elf.h:570
DT_NUM
@ DT_NUM
Number used.
Definition elf.h:571
DT_TEXTREL
@ DT_TEXTREL
at least on entry changes r/o section
Definition elf.h:559
DT_PLTRELSZ
@ DT_PLTRELSZ
total size of relocation entry
Definition elf.h:539
DT_LOPROC
@ DT_LOPROC
processor-specific
Definition elf.h:574
DT_RELASZ
@ DT_RELASZ
total size of relocation table
Definition elf.h:545
DT_STRTAB
@ DT_STRTAB
address of string table
Definition elf.h:542
DT_HIPROC
@ DT_HIPROC
processor-specific
Definition elf.h:575
DT_RUNPATH
@ DT_RUNPATH
Library search path.
Definition elf.h:566
DT_RELSZ
@ DT_RELSZ
total size of DT_REL relocation table
Definition elf.h:555
DT_INIT
@ DT_INIT
address of initialization function
Definition elf.h:549
DT_RELAENT
@ DT_RELAENT
size of DT_RELA relocation entry
Definition elf.h:546
DT_RELA
@ DT_RELA
address of relocation table
Definition elf.h:544
DT_NEEDED
@ DT_NEEDED
name of a needed library
Definition elf.h:538
DT_PTRREL
@ DT_PTRREL
type of relocation entry
Definition elf.h:557
DT_RPATH
@ DT_RPATH
search library path
Definition elf.h:552
DT_BIND_NOW
@ DT_BIND_NOW
Process relocations of object.
Definition elf.h:561
DT_NULL
@ DT_NULL
end of _DYNAMIC array
Definition elf.h:537
DT_HIOS
@ DT_HIOS
End of OS-specific.
Definition elf.h:573
DT_JMPREL
@ DT_JMPREL
address of relocation entries
Definition elf.h:560
DT_PREINIT_ARRAY
@ DT_PREINIT_ARRAY
Array with addresses of preinit fct.
Definition elf.h:569
DT_FINI_ARRAY
@ DT_FINI_ARRAY
Array with addresses of fini fct.
Definition elf.h:563
DT_RELENT
@ DT_RELENT
size of the DT_REL relocation entry
Definition elf.h:556
DT_REL
@ DT_REL
address of relocation table
Definition elf.h:554
DT_PLTGOT
@ DT_PLTGOT
address assoc with prog link table
Definition elf.h:540
DT_HASH
@ DT_HASH
address of symbol hash table
Definition elf.h:541
DT_LOOS
@ DT_LOOS
Start of OS-specific.
Definition elf.h:572
DT_ENCODING
@ DT_ENCODING
Start of encoded range.
Definition elf.h:568
DT_INIT_ARRAYSZ
@ DT_INIT_ARRAYSZ
Size in bytes of DT_INIT_ARRAY.
Definition elf.h:564
DT_DEBUG
@ DT_DEBUG
for debugging purposes
Definition elf.h:558
DT_STRSZ
@ DT_STRSZ
size of the string table
Definition elf.h:547
DT_SONAME
@ DT_SONAME
name of the shared object
Definition elf.h:551
DT_FLAGS
@ DT_FLAGS
Flags for the object being loaded.
Definition elf.h:567
DT_FINI
@ DT_FINI
address of termination function
Definition elf.h:550
DT_SYMTAB
@ DT_SYMTAB
address of symbol table
Definition elf.h:543
DT_INIT_ARRAY
@ DT_INIT_ARRAY
Array with addresses of init fct.
Definition elf.h:562
DF_1_LOADFLTR
@ DF_1_LOADFLTR
Trigger filtee loading at runtime.
Definition elf.h:600
DF_1_DISPRELPND
@ DF_1_DISPRELPND
Disp reloc applied at run-time.
Definition elf.h:612
DF_1_NOW
@ DF_1_NOW
Set RTLD_NOW for this object.
Definition elf.h:596
DF_1_NOOPEN
@ DF_1_NOOPEN
Set RTLD_NOOPEN for this object.
Definition elf.h:602
DF_1_DISPRELDNE
@ DF_1_DISPRELDNE
Disp reloc applied at build time.
Definition elf.h:611
DF_1_GLOBAL
@ DF_1_GLOBAL
Set RTLD_GLOBAL for this object.
Definition elf.h:597
DF_1_DIRECT
@ DF_1_DIRECT
Direct binding enabled.
Definition elf.h:604
DF_1_NODELETE
@ DF_1_NODELETE
Set RTLD_NODELETE for this object.
Definition elf.h:599
DF_1_NODUMP
@ DF_1_NODUMP
Object can't be dldump'ed.
Definition elf.h:608
DF_1_GROUP
@ DF_1_GROUP
Set RTLD_GROUP for this object.
Definition elf.h:598
DF_1_ENDFILTEE
@ DF_1_ENDFILTEE
Filtee terminates filters search.
Definition elf.h:610
DF_1_INTERPOSE
@ DF_1_INTERPOSE
Object is used to interpose.
Definition elf.h:606
DF_1_NODEFLIB
@ DF_1_NODEFLIB
Ignore default lib search path.
Definition elf.h:607
DF_1_ORIGIN
@ DF_1_ORIGIN
$ORIGIN must be handled.
Definition elf.h:603
DF_1_CONFALT
@ DF_1_CONFALT
Configuration alternative created.
Definition elf.h:609
DF_1_INITFIRST
@ DF_1_INITFIRST
Set RTLD_INITFIRST for this object.
Definition elf.h:601
ELFMAG1
@ ELFMAG1
e_ident[EI_MAG1]
Definition elf.h:292
ELFMAG0
@ ELFMAG0
e_ident[EI_MAG0]
Definition elf.h:291
ELFMAG3
@ ELFMAG3
e_ident[EI_MAG3]
Definition elf.h:294
ELFMAG2
@ ELFMAG2
e_ident[EI_MAG2]
Definition elf.h:293
NT_PRFPXREG
@ NT_PRFPXREG
Contains copy of fprxregset struct.
Definition elf.h:503
NT_TASKSTRUCT
@ NT_TASKSTRUCT
Contains copy of task structure.
Definition elf.h:492
NT_ASRS
@ NT_ASRS
Contains copy of asrset struct.
Definition elf.h:496
NT_LWPSINFO
@ NT_LWPSINFO
Contains copy of lwpinfo struct.
Definition elf.h:502
NT_LWPSTATUS
@ NT_LWPSTATUS
Contains copy of lwpstatus struct.
Definition elf.h:501
NT_AUXV
@ NT_AUXV
Contains copy of auxv array.
Definition elf.h:494
NT_PRCRED
@ NT_PRCRED
Contains copy of prcred struct.
Definition elf.h:499
NT_PSINFO
@ NT_PSINFO
Contains copy of psinfo struct.
Definition elf.h:498
NT_PRPSINFO
@ NT_PRPSINFO
Contains copy of prpsinfo struct.
Definition elf.h:490
NT_UTSNAME
@ NT_UTSNAME
Contains copy of utsname struct.
Definition elf.h:500
NT_FPREGSET
@ NT_FPREGSET
Contains copy of fpregset struct.
Definition elf.h:489
NT_PSTATUS
@ NT_PSTATUS
Contains copy of pstatus struct.
Definition elf.h:497
NT_PRXREG
@ NT_PRXREG
Contains copy of prxregset struct.
Definition elf.h:491
NT_PRSTATUS
@ NT_PRSTATUS
Contains copy of prstatus struct.
Definition elf.h:488
NT_PLATFORM
@ NT_PLATFORM
String from sysinfo(SI_PLATFORM).
Definition elf.h:493
NT_GWINDOWS
@ NT_GWINDOWS
Contains copy of gwindows struct.
Definition elf.h:495
EI_NIDENT
@ EI_NIDENT
Number of characters.
Definition elf.h:119
R_AARCH64_NONE
@ R_AARCH64_NONE
No reloc.
Definition elf.h:827
PF_ARM_SB
@ PF_ARM_SB
Segment contains the location addressed by the static base.
Definition elf.h:772
STT_LOPROC
@ STT_LOPROC
processor-specific
Definition elf.h:934
STT_FUNC
@ STT_FUNC
associated with a function or other code
Definition elf.h:929
STT_LOOS
@ STT_LOOS
OS-specific.
Definition elf.h:932
STT_NOTYPE
@ STT_NOTYPE
symbol's type not specified
Definition elf.h:927
STT_OBJECT
@ STT_OBJECT
associated with a data object
Definition elf.h:928
STT_HIOS
@ STT_HIOS
OS-specific.
Definition elf.h:933
STT_FILE
@ STT_FILE
source file name associated with object
Definition elf.h:931
STT_SECTION
@ STT_SECTION
associated with a section
Definition elf.h:930
STT_HIPROC
@ STT_HIPROC
processor-specific
Definition elf.h:935
EI_ABIVERSION
@ EI_ABIVERSION
ABI version.
Definition elf.h:284
EI_MAG1
@ EI_MAG1
file id 1
Definition elf.h:277
EI_DATA
@ EI_DATA
data encoding
Definition elf.h:281
EI_MAG0
@ EI_MAG0
file id 0
Definition elf.h:276
EI_PAD
@ EI_PAD
start of padding bytes
Definition elf.h:285
EI_MAG3
@ EI_MAG3
file id 3
Definition elf.h:279
EI_CLASS
@ EI_CLASS
file class
Definition elf.h:280
EI_OSABI
@ EI_OSABI
Operating system / ABI identification.
Definition elf.h:283
EI_VERSION
@ EI_VERSION
file version
Definition elf.h:282
EI_MAG2
@ EI_MAG2
file id 2
Definition elf.h:278
EF_ARM_ALIGN8
@ EF_ARM_ALIGN8
8-bit structure alignment is in use
Definition elf.h:738
EV_CURRENT
@ EV_CURRENT
Current version.
Definition elf.h:269
EV_NONE
@ EV_NONE
Invalid version.
Definition elf.h:268
PF_R
@ PF_R
Read.
Definition elf.h:480
PF_MASKPROC
@ PF_MASKPROC
Processor-specific.
Definition elf.h:482
PF_X
@ PF_X
Executable.
Definition elf.h:478
PF_MASKOS
@ PF_MASKOS
OS-specific.
Definition elf.h:481
PF_W
@ PF_W
Write.
Definition elf.h:479
SHT_NUM
@ SHT_NUM
Number of defined types.
Definition elf.h:396
SHT_HASH
@ SHT_HASH
symbol hash table
Definition elf.h:384
SHT_RELA
@ SHT_RELA
reloc entries w/ explicit addens
Definition elf.h:383
SHT_PROGBITS
@ SHT_PROGBITS
information defined by program
Definition elf.h:380
SHT_STRTAB
@ SHT_STRTAB
string table
Definition elf.h:382
SHT_SYMTAB_SHNDX
@ SHT_SYMTAB_SHNDX
Extended section indices.
Definition elf.h:395
SHT_REL
@ SHT_REL
reloc entries w/o explicit addens
Definition elf.h:388
SHT_HIOS
@ SHT_HIOS
End OS-specific.
Definition elf.h:398
SHT_FINI_ARRAY
@ SHT_FINI_ARRAY
Array of destructors.
Definition elf.h:392
SHT_HIPROC
@ SHT_HIPROC
End processor-specific.
Definition elf.h:400
SHT_GROUP
@ SHT_GROUP
Section group.
Definition elf.h:394
SHT_INIT_ARRAY
@ SHT_INIT_ARRAY
Array of constructors.
Definition elf.h:391
SHT_NOTE
@ SHT_NOTE
information that marks the file
Definition elf.h:386
SHT_SYMTAB
@ SHT_SYMTAB
symbol table
Definition elf.h:381
SHT_NOBITS
@ SHT_NOBITS
occupies no space in the file
Definition elf.h:387
SHT_LOUSER
@ SHT_LOUSER
Start application-specific.
Definition elf.h:401
SHT_NULL
@ SHT_NULL
inactive section header
Definition elf.h:379
SHT_HIUSER
@ SHT_HIUSER
End application-specific.
Definition elf.h:402
SHT_LOOS
@ SHT_LOOS
Start OS-specific.
Definition elf.h:397
SHT_DYNSYM
@ SHT_DYNSYM
symbol table (dynamic
Definition elf.h:390
SHT_PREINIT_ARRAY
@ SHT_PREINIT_ARRAY
Array of pre-constructors.
Definition elf.h:393
SHT_SHLIB
@ SHT_SHLIB
reserved + unspecified semantics
Definition elf.h:389
SHT_LOPROC
@ SHT_LOPROC
Start processor-specific.
Definition elf.h:399
SHT_DYNAMIC
@ SHT_DYNAMIC
information for dynamic linking
Definition elf.h:385
SHN_COMMON
@ SHN_COMMON
common symbols
Definition elf.h:342
SHN_UNDEF
@ SHN_UNDEF
undefined section header entry
Definition elf.h:337
SHN_HIPROC
@ SHN_HIPROC
upper bound of proc spec entr
Definition elf.h:340
SHN_LOPROC
@ SHN_LOPROC
lower bound of proc spec entr
Definition elf.h:339
SHN_ABS
@ SHN_ABS
absolute values for ref
Definition elf.h:341
SHN_LORESERVE
@ SHN_LORESERVE
lower bound of reserved indexes
Definition elf.h:338
SHN_HIRESERVE
@ SHN_HIRESERVE
upper bound of reserved indexes
Definition elf.h:343
DF_P1_LAZYLOAD
@ DF_P1_LAZYLOAD
Lazyload following object.
Definition elf.h:625
DF_P1_GROUPPERM
@ DF_P1_GROUPPERM
Symbols from next object are not generally available.
Definition elf.h:626
SHF_MERGE
@ SHF_MERGE
Might be merged.
Definition elf.h:411
SHF_INFO_LINK
@ SHF_INFO_LINK
`sh_info' contains SHT index */ SHF_LINK_ORDER = 0x80, /**< Preserve order after combining
Definition elf.h:413
SHF_STRINGS
@ SHF_STRINGS
Contains nul-terminated strings.
Definition elf.h:412
SHF_ALLOC
@ SHF_ALLOC
section occupies virt memory
Definition elf.h:409
SHF_MASKPROC
@ SHF_MASKPROC
processor-specific mask
Definition elf.h:420
SHF_GROUP
@ SHF_GROUP
Section is member of a group.
Definition elf.h:417
SHF_EXECINSTR
@ SHF_EXECINSTR
code section
Definition elf.h:410
SHF_OS_NONCONFORMING
@ SHF_OS_NONCONFORMING
Non-standard OS-specific handling required.
Definition elf.h:415
SHF_TLS
@ SHF_TLS
Section hold thread-local data.
Definition elf.h:418
SHF_WRITE
@ SHF_WRITE
writeable during execution
Definition elf.h:408
SHF_MASKOS
@ SHF_MASKOS
OS-specific.
Definition elf.h:419
AT_IGNORE
@ AT_IGNORE
Entry should be ignored.
Definition elf.h:942
AT_PHDR
@ AT_PHDR
Program headers for program.
Definition elf.h:944
AT_L4_AUX
@ AT_L4_AUX
L4Re AUX section.
Definition elf.h:957
AT_FLAGS
@ AT_FLAGS
Flags.
Definition elf.h:949
AT_GID
@ AT_GID
Real GID.
Definition elf.h:954
AT_EUID
@ AT_EUID
Effective UID.
Definition elf.h:953
AT_BASE
@ AT_BASE
Base address of interpreter.
Definition elf.h:948
AT_L4_ENV
@ AT_L4_ENV
L4Re ENV section.
Definition elf.h:958
AT_ENTRY
@ AT_ENTRY
Entry point of program.
Definition elf.h:950
AT_PHENT
@ AT_PHENT
Size of program header entry.
Definition elf.h:945
AT_EXECFD
@ AT_EXECFD
File descriptor of program.
Definition elf.h:943
AT_EGID
@ AT_EGID
Effective GID.
Definition elf.h:955
AT_NOTELF
@ AT_NOTELF
Program is not ELF.
Definition elf.h:951
AT_PAGESZ
@ AT_PAGESZ
System page size.
Definition elf.h:947
AT_UID
@ AT_UID
Real UID.
Definition elf.h:952
AT_PHNUM
@ AT_PHNUM
Number of program headers.
Definition elf.h:946
AT_NULL
@ AT_NULL
End of vector.
Definition elf.h:941
R_386_COPY
@ R_386_COPY
none
Definition elf.h:684
R_386_TLS_GD_CALL
@ R_386_TLS_GD_CALL
Relocation for call to __tls_get_addr().
Definition elf.h:707
R_386_RELATIVE
@ R_386_RELATIVE
B + A.
Definition elf.h:687
R_386_TLS_DTPOFF32
@ R_386_TLS_DTPOFF32
Offset in TLS block.
Definition elf.h:722
R_386_TLS_LDO_32
@ R_386_TLS_LDO_32
Offset relative to TLS block.
Definition elf.h:716
R_386_TLS_LDM
@ R_386_TLS_LDM
Direct 32 bit for GNU version of local dynamic thread local data in LE code.
Definition elf.h:698
R_386_GOT32
@ R_386_GOT32
G + A - P.
Definition elf.h:682
R_386_TLS_LDM_PUSH
@ R_386_TLS_LDM_PUSH
Tag for pushl in LDM TLS code.
Definition elf.h:712
R_386_TLS_LDM_CALL
@ R_386_TLS_LDM_CALL
Relocation for call to __tls_get_addr() in LDM code.
Definition elf.h:713
R_386_TLS_IE
@ R_386_TLS_IE
Address of GOT entry for static TLS block offset.
Definition elf.h:692
R_386_TLS_TPOFF
@ R_386_TLS_TPOFF
Offset in static TLS block.
Definition elf.h:691
R_386_TLS_LDM_POP
@ R_386_TLS_LDM_POP
Tag for popl in LDM TLS code.
Definition elf.h:715
R_386_TLS_LE_32
@ R_386_TLS_LE_32
Negated offset relative to static TLS block.
Definition elf.h:719
R_386_TLS_LE
@ R_386_TLS_LE
Offset relative to static TLS block.
Definition elf.h:695
R_386_32
@ R_386_32
S + A.
Definition elf.h:680
R_386_TLS_TPOFF32
@ R_386_TLS_TPOFF32
Negated offset in static TLS block.
Definition elf.h:723
R_386_TLS_DTPMOD32
@ R_386_TLS_DTPMOD32
ID of module containing symbol.
Definition elf.h:721
R_386_TLS_GD
@ R_386_TLS_GD
Direct 32 bit for GNU version of general dynamic thread local data.
Definition elf.h:696
R_386_TLS_GD_PUSH
@ R_386_TLS_GD_PUSH
Tag for pushl in GD TLS code.
Definition elf.h:706
R_386_TLS_LDM_32
@ R_386_TLS_LDM_32
Direct 32 bit for local dynamic thread local data in LE code.
Definition elf.h:710
R_386_NONE
@ R_386_NONE
none
Definition elf.h:679
R_386_TLS_GOTIE
@ R_386_TLS_GOTIE
GOT entry for static TLS block offset.
Definition elf.h:694
R_386_TLS_GD_POP
@ R_386_TLS_GD_POP
Tag for popl in GD TLS code.
Definition elf.h:709
R_386_GLOB_DAT
@ R_386_GLOB_DAT
S.
Definition elf.h:685
R_386_PC32
@ R_386_PC32
S + A - P.
Definition elf.h:681
R_386_GOTPC
@ R_386_GOTPC
GOT + A - P.
Definition elf.h:689
R_386_GOTOFF
@ R_386_GOTOFF
S + A - GOT.
Definition elf.h:688
R_386_TLS_IE_32
@ R_386_TLS_IE_32
GOT entry for negated static TLS block offset.
Definition elf.h:717
R_386_TLS_GD_32
@ R_386_TLS_GD_32
Direct 32 bit for general dynamic thread local data.
Definition elf.h:704
R_386_PLT32
@ R_386_PLT32
L + A - P.
Definition elf.h:683
R_386_NUM
@ R_386_NUM
Keep this the last entry.
Definition elf.h:724
R_386_JMP_SLOT
@ R_386_JMP_SLOT
S.
Definition elf.h:686
EM_88K
@ EM_88K
Motorola 88000.
Definition elf.h:190
EM_H8_300
@ EM_H8_300
Hitachi H8/300.
Definition elf.h:210
EM_TRICORE
@ EM_TRICORE
Siemens Tricore embedded processor.
Definition elf.h:208
EM_SVX
@ EM_SVX
Silicon Graphics SVx.
Definition elf.h:227
EM_IA_64
@ EM_IA_64
HP/Intel IA-64.
Definition elf.h:214
EM_PJ
@ EM_PJ
picoJava
Definition elf.h:245
EM_FR20
@ EM_FR20
Fujitsu FR20.
Definition elf.h:201
EM_TILEPRO
@ EM_TILEPRO
Tilera TILEPro.
Definition elf.h:251
EM_MMIX
@ EM_MMIX
Donald Knuth's educational 64-bit processor.
Definition elf.h:234
EM_M32
@ EM_M32
AT&T WE 32100.
Definition elf.h:186
EM_PDSP
@ EM_PDSP
Sony DSP Processor.
Definition elf.h:219
EM_SPARC
@ EM_SPARC
SPARC.
Definition elf.h:187
EM_X86_64
@ EM_X86_64
Advanced Micro Devices x86-64.
Definition elf.h:218
EM_TILEGX
@ EM_TILEGX
Tilera TILE-Gx.
Definition elf.h:253
EM_OPENRISC
@ EM_OPENRISC
OpenRISC 32-bit embedded processor.
Definition elf.h:246
EM_68HC11
@ EM_68HC11
Motorola MC68HC11 microcontroller.
Definition elf.h:224
EM_M32R
@ EM_M32R
Mitsubishi M32R.
Definition elf.h:242
EM_ARM
@ EM_ARM
Advanced RISC Machines ARM.
Definition elf.h:204
EM_ARC_A5
@ EM_ARC_A5
ARC Cores Tangent-A5.
Definition elf.h:247
EM_ALPHA
@ EM_ALPHA
Digital Alpha.
Definition elf.h:205
EM_H8_300H
@ EM_H8_300H
Hitachi H8/300H.
Definition elf.h:211
EM_H8S
@ EM_H8S
Hitachi H8/S.
Definition elf.h:212
EM_68K
@ EM_68K
Motorola 68000.
Definition elf.h:189
EM_PRISM
@ EM_PRISM
SiTera Prism.
Definition elf.h:236
EM_SPARC64
@ EM_SPARC64
SPARC 64-bit.
Definition elf.h:194
EM_ST19
@ EM_ST19
STMicroelectronics ST19 8 bit mc.
Definition elf.h:228
EM_JAVELIN
@ EM_JAVELIN
Infineon Technologies 32-bit embedded processor.
Definition elf.h:231
EM_FR30
@ EM_FR30
Fujitsu FR30.
Definition elf.h:238
EM_ST9PLUS
@ EM_ST9PLUS
STMicroelectronics ST9+ 8/16 mc.
Definition elf.h:221
EM_68HC08
@ EM_68HC08
Motorola MC68HC08 microcontroller.
Definition elf.h:225
EM_ALTERA_NIOS2
@ EM_ALTERA_NIOS2
Altera Nios II.
Definition elf.h:249
EM_MIPS
@ EM_MIPS
MIPS RS3000 big-endian.
Definition elf.h:192
EM_AARCH64
@ EM_AARCH64
ARM AARCH64.
Definition elf.h:250
EM_CRIS
@ EM_CRIS
Axis Communications 32-bit embedded processor.
Definition elf.h:230
EM_HUANY
@ EM_HUANY
Harvard University machine-independent object files.
Definition elf.h:235
EM_68HC16
@ EM_68HC16
Motorola MC68HC16 microcontroller.
Definition elf.h:223
EM_68HC05
@ EM_68HC05
Motorola MC68HC05 microcontroller.
Definition elf.h:226
EM_H8_500
@ EM_H8_500
Hitachi H8/500.
Definition elf.h:213
EM_VPP500
@ EM_VPP500
Fujitsu VPP500.
Definition elf.h:196
EM_PARISC
@ EM_PARISC
HP PA-RISC.
Definition elf.h:195
EM_960
@ EM_960
Intel 80960.
Definition elf.h:198
EM_860
@ EM_860
Intel 80860.
Definition elf.h:191
EM_FX66
@ EM_FX66
Siemens FX66 microcontroller.
Definition elf.h:220
EM_XTENSA
@ EM_XTENSA
Tensilica Xtensa Architecture.
Definition elf.h:248
EM_68HC12
@ EM_68HC12
Motorola M68HC12.
Definition elf.h:217
EM_MN10200
@ EM_MN10200
Matsushita MN10200.
Definition elf.h:244
EM_VAX
@ EM_VAX
Digital VAX.
Definition elf.h:229
EM_COLDFIRE
@ EM_COLDFIRE
Motorola Coldfire.
Definition elf.h:216
EM_SPARC32PLUS
@ EM_SPARC32PLUS
Sun's V8plus.
Definition elf.h:197
EM_RCE
@ EM_RCE
Motorola RCE.
Definition elf.h:203
EM_V800
@ EM_V800
NEC V800.
Definition elf.h:200
EM_RH32
@ EM_RH32
TRW RH-32.
Definition elf.h:202
EM_NONE
@ EM_NONE
no machine
Definition elf.h:185
EM_ARC
@ EM_ARC
Argonaut RISC Core, Argonaut Techn Inc.
Definition elf.h:209
EM_ZSP
@ EM_ZSP
LSI Logic 16-bit DSP Processor.
Definition elf.h:233
EM_PPC
@ EM_PPC
PowerPC.
Definition elf.h:199
EM_SH
@ EM_SH
Hitachi SuperH.
Definition elf.h:206
EM_AVR
@ EM_AVR
Atmel AVR 8-bit microcontroller.
Definition elf.h:237
EM_MIPS_X
@ EM_MIPS_X
Stanford MIPS-X.
Definition elf.h:215
EM_D30V
@ EM_D30V
Mitsubishi D30V.
Definition elf.h:240
EM_MIPS_RS4_BE
@ EM_MIPS_RS4_BE
MIPS RS4000 big-endian.
Definition elf.h:193
EM_MN10300
@ EM_MN10300
Matsushita MN10300.
Definition elf.h:243
EM_D10V
@ EM_D10V
Mitsubishi D10V.
Definition elf.h:239
EM_RISCV
@ EM_RISCV
RISC-V.
Definition elf.h:254
EM_SPARCV9
@ EM_SPARCV9
SPARC v9 64-bit.
Definition elf.h:207
EM_MICROBLAZE
@ EM_MICROBLAZE
Xilinx MicroBlaze.
Definition elf.h:252
EM_386
@ EM_386
Intel 80386.
Definition elf.h:188
EM_FIREPATH
@ EM_FIREPATH
Element 14 64-bit DSP Processor.
Definition elf.h:232
EM_ST7
@ EM_ST7
STmicroelectronics ST7 8 bit mc.
Definition elf.h:222
EM_V850
@ EM_V850
NEC v850.
Definition elf.h:241
NT_VERSION
@ NT_VERSION
Contains a version string.
Definition elf.h:509
STB_LOOS
@ STB_LOOS
OS-specific.
Definition elf.h:917
STB_GLOBAL
@ STB_GLOBAL
visible to all objects being combined
Definition elf.h:915
STB_LOPROC
@ STB_LOPROC
Processor-specific.
Definition elf.h:919
STB_LOCAL
@ STB_LOCAL
not visible outside object file
Definition elf.h:914
STB_WEAK
@ STB_WEAK
resemble global symbols
Definition elf.h:916
STB_HIPROC
@ STB_HIPROC
Processor-specific.
Definition elf.h:920
STB_HIOS
@ STB_HIOS
OS-specific.
Definition elf.h:918
DF_STATIC_TLS
@ DF_STATIC_TLS
Module uses the static TLS model.
Definition elf.h:587
DF_BIND_NOW
@ DF_BIND_NOW
No lazy binding for this object.
Definition elf.h:586
DF_ORIGIN
@ DF_ORIGIN
Object may use DF_ORIGIN.
Definition elf.h:583
DF_SYMBOLIC
@ DF_SYMBOLIC
Symbol resolutions starts here.
Definition elf.h:584
DF_TEXTREL
@ DF_TEXTREL
Object contains text relocations.
Definition elf.h:585
SHF_ARM_ENTRYSECT
@ SHF_ARM_ENTRYSECT
Section contains an entry point.
Definition elf.h:764
SHF_ARM_COMDEF
@ SHF_ARM_COMDEF
Section may be multiply defined in the input to a link step.
Definition elf.h:765
R_ARM_ABS16
@ R_ARM_ABS16
Direct 16 bit.
Definition elf.h:784
R_ARM_RELATIVE
@ R_ARM_RELATIVE
Adjust by program base.
Definition elf.h:799
R_ARM_PC24
@ R_ARM_PC24
PC relative 26 bit branch.
Definition elf.h:780
R_ARM_GOTPC
@ R_ARM_GOTPC
32 bit PC relative offset to GOT
Definition elf.h:801
R_ARM_THM_PC9
@ R_ARM_THM_PC9
thumb conditional branch
Definition elf.h:813
R_ARM_NONE
@ R_ARM_NONE
No reloc.
Definition elf.h:779
R_ARM_ABS12
@ R_ARM_ABS12
Direct 12 bit.
Definition elf.h:785
R_ARM_THM_PC11
@ R_ARM_THM_PC11
thumb unconditional branch
Definition elf.h:812
R_ARM_NUM
@ R_ARM_NUM
Keep this the last entry.
Definition elf.h:821
R_ARM_GOT32
@ R_ARM_GOT32
32 bit GOT entry
Definition elf.h:802
R_ARM_GLOB_DAT
@ R_ARM_GLOB_DAT
Create GOT entry.
Definition elf.h:797
R_ARM_ABS8
@ R_ARM_ABS8
Direct 8 bit.
Definition elf.h:787
R_ARM_GOTOFF
@ R_ARM_GOTOFF
32 bit offset to GOT
Definition elf.h:800
R_ARM_REL32
@ R_ARM_REL32
PC relative 32 bit.
Definition elf.h:782
R_ARM_PLT32
@ R_ARM_PLT32
32 bit PLT address
Definition elf.h:803
R_ARM_COPY
@ R_ARM_COPY
Copy symbol at runtime.
Definition elf.h:796
R_ARM_ABS32
@ R_ARM_ABS32
Direct 32 bit.
Definition elf.h:781
R_ARM_JUMP_SLOT
@ R_ARM_JUMP_SLOT
Create PLT entry.
Definition elf.h:798
l4int.h
Fixed sized integer types, generic version.
Elf32_Auxv
Auxiliary vector (32-bit).
Definition elf.h:963
Elf32_Auxv::atype
Elf32_Word atype
Definition elf.h:964
Elf32_Dyn
ELF32 dynamic entry.
Definition elf.h:514
Elf32_Dyn::d_val
Elf32_Word d_val
integer values with various interpret.
Definition elf.h:518
Elf32_Dyn::d_tag
Elf32_Sword d_tag
Definition elf.h:515
Elf32_Dyn::d_ptr
Elf32_Addr d_ptr
program virtual addresses
Definition elf.h:519
Elf32_Ehdr
ELF32 header.
Definition elf.h:126
Elf32_Ehdr::e_shoff
Elf32_Off e_shoff
offset of file header table
Definition elf.h:133
Elf32_Ehdr::e_ehsize
Elf32_Half e_ehsize
size of ELF header
Definition elf.h:135
Elf32_Ehdr::e_shnum
Elf32_Half e_shnum
number of entries in section header table
Definition elf.h:139
Elf32_Ehdr::e_machine
Elf32_Half e_machine
required architecture
Definition elf.h:129
Elf32_Ehdr::e_phoff
Elf32_Off e_phoff
offset of program header table
Definition elf.h:132
Elf32_Ehdr::e_phnum
Elf32_Half e_phnum
number of entries in program header table
Definition elf.h:137
Elf32_Ehdr::e_shstrndx
Elf32_Half e_shstrndx
section header table index of strtab
Definition elf.h:140
Elf32_Ehdr::e_type
Elf32_Half e_type
type of ELF file
Definition elf.h:128
Elf32_Ehdr::e_flags
Elf32_Word e_flags
processor-specific flags
Definition elf.h:134
Elf32_Ehdr::e_version
Elf32_Word e_version
file version
Definition elf.h:130
Elf32_Ehdr::e_shentsize
Elf32_Half e_shentsize
size of section header entry
Definition elf.h:138
Elf32_Ehdr::e_entry
Elf32_Addr e_entry
initial program counter
Definition elf.h:131
Elf32_Ehdr::e_ident
unsigned char e_ident[EI_NIDENT]
see Elf_EIs
Definition elf.h:127
Elf32_Ehdr::e_phentsize
Elf32_Half e_phentsize
size of program header entry
Definition elf.h:136
Elf32_Phdr
ELF32 program header.
Definition elf.h:426
Elf32_Phdr::p_vaddr
Elf32_Addr p_vaddr
memory address of prog section
Definition elf.h:429
Elf32_Phdr::p_flags
Elf32_Word p_flags
flags
Definition elf.h:433
Elf32_Phdr::p_type
Elf32_Word p_type
type of program section
Definition elf.h:427
Elf32_Phdr::p_offset
Elf32_Off p_offset
file offset of program section
Definition elf.h:428
Elf32_Phdr::p_filesz
Elf32_Word p_filesz
file size of program section
Definition elf.h:431
Elf32_Phdr::p_memsz
Elf32_Word p_memsz
memory size of program section
Definition elf.h:432
Elf32_Phdr::p_paddr
Elf32_Addr p_paddr
physical address (ignored)
Definition elf.h:430
Elf32_Phdr::p_align
Elf32_Word p_align
alignment of section
Definition elf.h:434
Elf32_Rel
ELF32 relocation entry w/o addend.
Definition elf.h:632
Elf32_Rela
ELF32 relocation entry w/ addend.
Definition elf.h:639
Elf32_Shdr
ELF32 section header.
Definition elf.h:348
Elf32_Shdr::sh_entsize
Elf32_Word sh_entsize
size of entry if sect is table
Definition elf.h:358
Elf32_Shdr::sh_flags
Elf32_Word sh_flags
section's flags
Definition elf.h:351
Elf32_Shdr::sh_addralign
Elf32_Word sh_addralign
address alignment constraints
Definition elf.h:357
Elf32_Shdr::sh_offset
Elf32_Off sh_offset
file offset of section
Definition elf.h:353
Elf32_Shdr::sh_name
Elf32_Word sh_name
name of sect (idx into strtab)
Definition elf.h:349
Elf32_Shdr::sh_addr
Elf32_Addr sh_addr
memory address of section
Definition elf.h:352
Elf32_Shdr::sh_size
Elf32_Word sh_size
file size of section
Definition elf.h:354
Elf32_Shdr::sh_type
Elf32_Word sh_type
section's type
Definition elf.h:350
Elf32_Shdr::sh_link
Elf32_Word sh_link
idx to associated header section
Definition elf.h:355
Elf32_Shdr::sh_info
Elf32_Word sh_info
extra info of header section
Definition elf.h:356
Elf32_Sym
ELF32 symbol table entry.
Definition elf.h:872
Elf32_Sym::st_size
Elf32_Word st_size
size of associated symbol
Definition elf.h:875
Elf32_Sym::st_other
unsigned char st_other
undefined
Definition elf.h:877
Elf32_Sym::st_shndx
Elf32_Half st_shndx
associated section header
Definition elf.h:878
Elf32_Sym::st_name
Elf32_Word st_name
name of symbol (idx symstrtab)
Definition elf.h:873
Elf32_Sym::st_info
unsigned char st_info
type and binding info
Definition elf.h:876
Elf32_Sym::st_value
Elf32_Addr st_value
value of associated symbol
Definition elf.h:874
Elf64_Auxv
Auxiliary vector (64-bit).
Definition elf.h:970
Elf64_Auxv::atype
Elf64_Word atype
Definition elf.h:971
Elf64_Dyn
ELF64 dynamic entry.
Definition elf.h:525
Elf64_Dyn::d_ptr
Elf64_Addr d_ptr
program virtual addresses
Definition elf.h:530
Elf64_Dyn::d_tag
Elf64_Sxword d_tag
Definition elf.h:526
Elf64_Dyn::d_val
Elf64_Xword d_val
integer values with various interpret.
Definition elf.h:529
Elf64_Ehdr
ELF64 header.
Definition elf.h:147
Elf64_Ehdr::e_type
Elf64_Half e_type
type of ELF file
Definition elf.h:149
Elf64_Ehdr::e_shentsize
Elf64_Half e_shentsize
size of section header entry
Definition elf.h:159
Elf64_Ehdr::e_shnum
Elf64_Half e_shnum
number of entries in section header table
Definition elf.h:160
Elf64_Ehdr::e_version
Elf64_Word e_version
file version
Definition elf.h:151
Elf64_Ehdr::e_ehsize
Elf64_Half e_ehsize
size of ELF header
Definition elf.h:156
Elf64_Ehdr::e_shoff
Elf64_Off e_shoff
offset of file header table
Definition elf.h:154
Elf64_Ehdr::e_entry
Elf64_Addr e_entry
initial program counter
Definition elf.h:152
Elf64_Ehdr::e_phentsize
Elf64_Half e_phentsize
size of program header entry
Definition elf.h:157
Elf64_Ehdr::e_ident
unsigned char e_ident[EI_NIDENT]
see Elf_EIs
Definition elf.h:148
Elf64_Ehdr::e_phoff
Elf64_Off e_phoff
offset of program header table
Definition elf.h:153
Elf64_Ehdr::e_machine
Elf64_Half e_machine
required architecture
Definition elf.h:150
Elf64_Ehdr::e_flags
Elf64_Word e_flags
processor-specific flags
Definition elf.h:155
Elf64_Ehdr::e_shstrndx
Elf64_Half e_shstrndx
section header table index of strtab
Definition elf.h:161
Elf64_Ehdr::e_phnum
Elf64_Half e_phnum
number of entries in program header table
Definition elf.h:158
Elf64_Phdr
ELF64 program header.
Definition elf.h:439
Elf64_Phdr::p_memsz
Elf64_Xword p_memsz
memory size of program section
Definition elf.h:446
Elf64_Phdr::p_vaddr
Elf64_Addr p_vaddr
memory address of prog section
Definition elf.h:443
Elf64_Phdr::p_paddr
Elf64_Addr p_paddr
physical address (ignored)
Definition elf.h:444
Elf64_Phdr::p_offset
Elf64_Off p_offset
file offset of program section
Definition elf.h:442
Elf64_Phdr::p_align
Elf64_Xword p_align
alignment of section
Definition elf.h:447
Elf64_Phdr::p_flags
Elf64_Word p_flags
flags
Definition elf.h:441
Elf64_Phdr::p_type
Elf64_Word p_type
type of program section
Definition elf.h:440
Elf64_Phdr::p_filesz
Elf64_Xword p_filesz
file size of program section
Definition elf.h:445
Elf64_Rel
ELF64 relocation entry w/o addend.
Definition elf.h:647
Elf64_Rela
ELF64 relocation entry w/ addend.
Definition elf.h:654
Elf64_Shdr
ELF64 section header.
Definition elf.h:363
Elf64_Shdr::sh_name
Elf64_Word sh_name
name of sect (idx into strtab)
Definition elf.h:364
Elf64_Shdr::sh_flags
Elf64_Xword sh_flags
section's flags
Definition elf.h:366
Elf64_Shdr::sh_link
Elf64_Word sh_link
idx to associated header section
Definition elf.h:370
Elf64_Shdr::sh_type
Elf64_Word sh_type
section's type
Definition elf.h:365
Elf64_Shdr::sh_info
Elf64_Word sh_info
extra info of header section
Definition elf.h:371
Elf64_Shdr::sh_entsize
Elf64_Xword sh_entsize
size of entry if sect is table
Definition elf.h:373
Elf64_Shdr::sh_size
Elf64_Xword sh_size
file size of section
Definition elf.h:369
Elf64_Shdr::sh_addralign
Elf64_Xword sh_addralign
address alignment constraints
Definition elf.h:372
Elf64_Shdr::sh_addr
Elf64_Addr sh_addr
memory address of section
Definition elf.h:367
Elf64_Shdr::sh_offset
Elf64_Off sh_offset
file offset of section
Definition elf.h:368
Elf64_Sym
ELF64 symbol table entry.
Definition elf.h:883
Elf64_Sym::st_shndx
Elf64_Half st_shndx
associated section header
Definition elf.h:887
Elf64_Sym::st_name
Elf64_Word st_name
name of symbol (idx symstrtab)
Definition elf.h:884
Elf64_Sym::st_value
Elf64_Addr st_value
value of associated symbol
Definition elf.h:888
Elf64_Sym::st_info
unsigned char st_info
type and binding info
Definition elf.h:885
Elf64_Sym::st_other
unsigned char st_other
undefined
Definition elf.h:886
Elf64_Sym::st_size
Elf64_Xword st_size
size of associated symbol
Definition elf.h:889