#include <arch/elf.h>
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | elf32_header |
ELF header. More... | |
struct | elf32_section_header |
struct | elf32_segment_header |
struct | elf32_symbol |
struct | elf64_header |
struct | elf64_section_header |
struct | elf64_segment_header |
struct | elf64_symbol |
Defines | |
#define | EE_INCOMPATIBLE 3 |
#define | EE_INVALID 1 |
#define | EE_IRRECOVERABLE 5 |
#define | EE_MEMORY 2 |
#define | EE_OK 0 |
ELF error return codes. | |
#define | EE_UNSUPPORTED 4 |
#define | EI_ABIVERSION 8 |
#define | EI_CLASS 4 |
#define | EI_DATA 5 |
#define | EI_MAG0 0 |
ELF identification indexes. | |
#define | EI_MAG1 1 |
#define | EI_MAG2 2 |
#define | EI_MAG3 3 |
#define | EI_NIDENT 16 |
#define | EI_OSABI 7 |
#define | EI_PAD 9 |
#define | EI_VERSION 6 |
#define | ELF_ST_BIND(i) ((i) >> 4) |
Macros for decomposing elf_symbol.st_info into binging and type. | |
#define | ELF_ST_INFO(b, t) (((b) << 4) + ((t) & 0x0f)) |
#define | ELF_ST_TYPE(i) ((i) & 0x0f) |
#define | ELFCLASS32 1 |
#define | ELFCLASS64 2 |
#define | ELFCLASSNONE 0 |
ELF file classes. | |
#define | ELFDATA2LSB 1 |
#define | ELFDATA2MSB 2 |
#define | ELFDATANONE 0 |
ELF data encoding types. | |
#define | ELFMAG0 0x7f |
ELF magic number. | |
#define | ELFMAG1 'E' |
#define | ELFMAG2 'L' |
#define | ELFMAG3 'F' |
#define | EM_386 3 |
#define | EM_ARM 40 |
#define | EM_IA_64 50 |
#define | EM_MIPS 8 |
#define | EM_MIPS_RS3_LE 10 |
#define | EM_NO 0 |
ELF machine types. | |
#define | EM_PPC 20 |
#define | EM_PPC64 21 |
#define | EM_SPARC 2 |
#define | EM_SPARCV9 43 |
#define | EM_X86_64 62 |
#define | ET_CORE 4 |
#define | ET_DYN 3 |
#define | ET_EXEC 2 |
#define | ET_HIPROC 0xffff |
#define | ET_LOPROC 0xff00 |
#define | ET_NONE 0 |
ELF types. | |
#define | ET_REL 1 |
#define | EV_CURRENT 1 |
current ELF version | |
#define | PF_R 4 |
#define | PF_W 2 |
#define | PF_X 1 |
Program segment attributes. | |
#define | PT_DYNAMIC 2 |
#define | PT_HIPROC 0x7fffffff |
#define | PT_INTERP 3 |
#define | PT_LOAD 1 |
#define | PT_LOPROC 0x70000000 |
#define | PT_NOTE 4 |
#define | PT_NULL 0 |
Program segment types. | |
#define | PT_PHDR 6 |
#define | PT_SHLIB 5 |
#define | SHF_ALLOC 0x2 |
#define | SHF_EXECINSTR 0x4 |
#define | SHF_MASKPROC 0xf0000000 |
#define | SHF_TLS 0x400 |
#define | SHF_WRITE 0x1 |
ELF section flags. | |
#define | SHT_DYNAMIC 6 |
#define | SHT_DYNSYM 11 |
#define | SHT_HASH 5 |
#define | SHT_HIOS 0x6fffffff |
#define | SHT_HIPROC 0x7fffffff |
#define | SHT_HIUSER 0xffffffff |
#define | SHT_LOOS 0x60000000 |
#define | SHT_LOPROC 0x70000000 |
#define | SHT_LOUSER 0x80000000 |
#define | SHT_NOBITS 8 |
#define | SHT_NOTE 7 |
#define | SHT_NULL 0 |
ELF section types. | |
#define | SHT_PROGBITS 1 |
#define | SHT_REL 9 |
#define | SHT_RELA 4 |
#define | SHT_SHLIB 10 |
#define | SHT_STRTAB 3 |
#define | SHT_SYMTAB 2 |
#define | STB_GLOBAL 1 |
#define | STB_HIPROC 15 |
#define | STB_LOCAL 0 |
Symbol binding. | |
#define | STB_LOPROC 13 |
#define | STB_WEAK 2 |
#define | STT_FILE 4 |
#define | STT_FUNC 2 |
#define | STT_HIPROC 15 |
#define | STT_LOPROC 13 |
#define | STT_NOTYPE 0 |
Symbol types. | |
#define | STT_OBJECT 1 |
#define | STT_SECTION 3 |
Typedefs | |
typedef uint32_t | elf32_addr |
32-bit ELF data types. | |
typedef uint32_t | elf32_off |
typedef uint64_t | elf64_addr |
64-bit ELF data types. | |
typedef uint64_t | elf64_off |
typedef uint16_t | elf_half |
typedef int32_t | elf_sword |
typedef int64_t | elf_sxword |
typedef uint32_t | elf_word |
typedef uint64_t | elf_xword |
ELF data types. | |
Functions | |
char * | elf_error (unsigned int rc) |
Print error message according to error code. |
Definition in file elf.h.