Functions
ELF_R_SYM()
# define ELF_R_SYM(info) ELF32_R_SYM(info)
ELF_R_TYPE()
# define ELF_R_TYPE(info) ELF32_R_TYPE(info)
ELF_ST_TYPE()
# define ELF_ST_TYPE(info) ELF32_ST_TYPE(info)
ELF32_R_SYM()
# define ELF32_R_SYM(info) ((info) >> 8)
ELF32_R_TYPE()
# define ELF32_R_TYPE(info) ((info) & 0xf)
ELF64_R_SYM()
# define ELF64_R_SYM(info) ((info) >> 32)
ELF64_R_TYPE()
# define ELF64_R_TYPE(info) ((info) & 0xffffffff)
ELF_ST_BIND()
# define ELF_ST_BIND(info) (info >> 4)
ELF32_ST_BIND()
# define ELF32_ST_BIND(info) ELF_ST_BIND(info)
ELF32_ST_TYPE()
# define ELF32_ST_TYPE(info) ELF_ST_TYPE(info)
ELF64_ST_BIND()
# define ELF64_ST_BIND(info) ELF_ST_BIND(info)
ELF64_ST_TYPE()
# define ELF64_ST_TYPE(info) ELF_ST_TYPE(info)
Types and Values
ELFCLASS
# define ELFCLASS ELFCLASS32
Elf_Addr
# define Elf_Addr Elf32_Addr
Elf_Dyn
# define Elf_Dyn Elf32_Dyn
Elf_Ehdr
# define Elf_Ehdr Elf32_Ehdr
Elf_Off
# define Elf_Off Elf32_Off
Elf_Phdr
# define Elf_Phdr Elf32_Phdr
Elf_Shdr
# define Elf_Shdr Elf32_Shdr
Elf_Rel
# define Elf_Rel Elf32_Rel
Elf_Rela
# define Elf_Rela Elf32_Rela
Elf_Sym
# define Elf_Sym Elf32_Sym
Elf_Word
# define Elf_Word Elf32_Word
AuxInfo
# define AuxInfo Aux32Info
Elf_Byte
typedef uint8_t Elf_Byte;
Elf32_Addr
typedef uint32_t Elf32_Addr;
Elf32_Half
typedef uint16_t Elf32_Half;
Elf32_Off
typedef uint32_t Elf32_Off;
Elf32_Sword
typedef int32_t Elf32_Sword;
Elf32_Word
typedef uint32_t Elf32_Word;
Elf64_Addr
typedef uint64_t Elf64_Addr;
Elf64_Half
typedef uint32_t Elf64_Half;
Elf64_Off
typedef uint64_t Elf64_Off;
Elf64_Quarter
typedef uint16_t Elf64_Quarter;
Elf64_Shalf
typedef int32_t Elf64_Shalf;
Elf64_Sxword
typedef int64_t Elf64_Sxword;
Elf64_Word
typedef uint32_t Elf64_Word;
Elf64_Xword
typedef uint64_t Elf64_Xword;
EI_MAG0
# define EI_MAG0 0
EI_MAG1
# define EI_MAG1 1
EI_MAG2
# define EI_MAG2 2
EI_MAG3
# define EI_MAG3 3
EI_CLASS
# define EI_CLASS 4
EI_DATA
# define EI_DATA 5
EI_VERSION
# define EI_VERSION 6
EI_NIDENT
# define EI_NIDENT 16
ELFMAG0
# define ELFMAG0 0x7f
ELFMAG1
# define ELFMAG1 'E'
ELFMAG2
# define ELFMAG2 'L'
ELFMAG3
# define ELFMAG3 'F'
ELFMAG
# define ELFMAG "\177ELF"
SELFMAG
# define SELFMAG 4
ELFCLASSNONE
# define ELFCLASSNONE 0
ELFCLASS32
# define ELFCLASS32 1
ELFCLASS64
# define ELFCLASS64 2
ELFDATANONE
# define ELFDATANONE 0
ELFDATA2LSB
# define ELFDATA2LSB 1
ELFDATA2MSB
# define ELFDATA2MSB 2
EV_NONE
# define EV_NONE 0
EV_CURRENT
# define EV_CURRENT 1
ET_NONE
# define ET_NONE 0
ET_EXEC
# define ET_EXEC 2
ET_CORE
# define ET_CORE 4
ET_LOPROC
# define ET_LOPROC 0xff00
ET_HIPROC
# define ET_HIPROC 0xffff
EM_NONE
# define EM_NONE 0
EM_SPARC
# define EM_SPARC 2
EM_MIPS
# define EM_MIPS 8
EM_ARM
# define EM_ARM 40
EM_SPARCV9
# define EM_SPARCV9 43
EM_X86_64
# define EM_X86_64 62
SHN_UNDEF
# define SHN_UNDEF 0
SHN_ABS
# define SHN_ABS 0xfff1
SHN_COMMON
# define SHN_COMMON 0xfff2
SHT_NULL
# define SHT_NULL 0
SHT_PROGBITS
# define SHT_PROGBITS 1
SHT_SYMTAB
# define SHT_SYMTAB 2
SHT_STRTAB
# define SHT_STRTAB 3
SHT_RELA
# define SHT_RELA 4
SHT_HASH
# define SHT_HASH 5
SHT_DYNAMIC
# define SHT_DYNAMIC 6
SHT_NOTE
# define SHT_NOTE 7
SHT_NOBITS
# define SHT_NOBITS 8
SHT_REL
# define SHT_REL 9
SHT_SHLIB
# define SHT_SHLIB 10
SHT_DYNSYM
# define SHT_DYNSYM 11
SHF_WRITE
# define SHF_WRITE 0x1
SHF_ALLOC
# define SHF_ALLOC 0x2
SHF_EXECINSTR
# define SHF_EXECINSTR 0x4
PT_NULL
# define PT_NULL 0
PT_LOAD
# define PT_LOAD 1
PT_DYNAMIC
# define PT_DYNAMIC 2
PT_INTERP
# define PT_INTERP 3
PT_NOTE
# define PT_NOTE 4
PT_SHLIB
# define PT_SHLIB 5
PT_PHDR
# define PT_PHDR 6
PT_LOPROC
# define PT_LOPROC 0x70000000
PT_HIPROC
# define PT_HIPROC 0x7fffffff
R_386_NONE
# define R_386_NONE 0
R_386_32
# define R_386_32 1
R_386_PC32
# define R_386_PC32 2
R_386_GOT32
# define R_386_GOT32 3
R_386_PLT32
# define R_386_PLT32 4
R_386_COPY
# define R_386_COPY 5
R_386_GLOB_DAT
# define R_386_GLOB_DAT 6
R_386_JMP_SLOT
# define R_386_JMP_SLOT 7
R_386_RELATIVE
# define R_386_RELATIVE 8
R_386_GOTOFF
# define R_386_GOTOFF 9
R_386_GOTPC
# define R_386_GOTPC 10
R_X86_64_NONE
# define R_X86_64_NONE 0
R_X86_64_64
# define R_X86_64_64 1
R_X86_64_PC32
# define R_X86_64_PC32 2
R_X86_64_GOT32
# define R_X86_64_GOT32 3
R_X86_64_PLT32
# define R_X86_64_PLT32 4
R_X86_64_COPY
# define R_X86_64_COPY 5
R_X86_64_GLOB_DAT
# define R_X86_64_GLOB_DAT 6
R_X86_64_JUMP_SLOT
# define R_X86_64_JUMP_SLOT 7
R_X86_64_RELATIVE
# define R_X86_64_RELATIVE 8
R_X86_64_GOTPCREL
# define R_X86_64_GOTPCREL 9
STN_UNDEF
# define STN_UNDEF 0
STB_LOCAL
# define STB_LOCAL 0
STB_GLOBAL
# define STB_GLOBAL 1
STB_WEAK
# define STB_WEAK 2
STB_LOOS
# define STB_LOOS 10
STB_HIOS
# define STB_HIOS 12
STB_LOPROC
# define STB_LOPROC 13
STB_HIPROC
# define STB_HIPROC 15
STT_NOTYPE
# define STT_NOTYPE 0
STT_OBJECT
# define STT_OBJECT 1
STT_FUNC
# define STT_FUNC 2
STT_SECTION
# define STT_SECTION 3
STT_FILE
# define STT_FILE 4
STT_NUM
# define STT_NUM 5
STT_LOOS
# define STT_LOOS 10
STT_HIOS
# define STT_HIOS 12
STT_LOPROC
# define STT_LOPROC 13
STT_HIPROC
# define STT_HIPROC 15
DT_NULL
# define DT_NULL 0
DT_NEEDED
# define DT_NEEDED 1
DT_PLTRELSZ
# define DT_PLTRELSZ 2
DT_PLTGOT
# define DT_PLTGOT 3
DT_HASH
# define DT_HASH 4
DT_STRTAB
# define DT_STRTAB 5
DT_SYMTAB
# define DT_SYMTAB 6
DT_RELA
# define DT_RELA 7
DT_RELASZ
# define DT_RELASZ 8
DT_RELAENT
# define DT_RELAENT 9
DT_STRSZ
# define DT_STRSZ 10
DT_SYMENT
# define DT_SYMENT 11
DT_INIT
# define DT_INIT 12
DT_FINI
# define DT_FINI 13
DT_SONAME
# define DT_SONAME 14
DT_RPATH
# define DT_RPATH 15
DT_SYMBOLIC
# define DT_SYMBOLIC 16
DT_REL
# define DT_REL 17
DT_RELSZ
# define DT_RELSZ 18
DT_RELENT
# define DT_RELENT 19
DT_PLTREL
# define DT_PLTREL 20
DT_DEBUG
# define DT_DEBUG 21
DT_TEXTREL
# define DT_TEXTREL 22
DT_JMPREL
# define DT_JMPREL 23
DT_BIND_NOW
# define DT_BIND_NOW 24
DT_INIT_ARRAY
# define DT_INIT_ARRAY 25
DT_FINI_ARRAY
# define DT_FINI_ARRAY 26
DT_FINI_ARRAYSZ
# define DT_FINI_ARRAYSZ 27
DT_INIT_ARRAYSZ
# define DT_INIT_ARRAYSZ 28
DT_NUM
# define DT_NUM 29
Elf64_Dyn
typedef struct {
Elf64_Xword d_tag;
union
{
Elf64_Addr d_ptr;
Elf64_Xword d_val;
} d_un;
} Elf64_Dyn;
AT_NULL
# define AT_NULL 0
AT_IGNORE
# define AT_IGNORE 1
AT_EXECFD
# define AT_EXECFD 2
AT_PHDR
# define AT_PHDR 3
AT_PHENT
# define AT_PHENT 4
AT_PHNUM
# define AT_PHNUM 5
AT_PAGESZ
# define AT_PAGESZ 6
AT_BASE
# define AT_BASE 7
AT_FLAGS
# define AT_FLAGS 8
AT_ENTRY
# define AT_ENTRY 9
AT_STACKBASE
# define AT_STACKBASE 13