GEL  0.99
gel_elf.h File Reference
#include <gel/common.h>
#include <gel/gel.h>

Go to the source code of this file.

Data Structures

struct  Elf32_Ehdr
 
struct  Elf32_Shdr
 
struct  Elf32_Phdr
 
struct  Elf32_Dyn
 
struct  Elf32_Sym
 
struct  Elf32_Rel
 
struct  Elf32_Rela
 

Macros

#define ET_NONE   0
 
#define ET_REL   1
 
#define ET_EXEC   2
 
#define ET_DYN   3
 
#define ET_CORE   4
 
#define EI_MAG0   0
 
#define EI_MAG1   1
 
#define EI_MAG2   2
 
#define EI_MAG3   3
 
#define EI_CLASS   4
 
#define EI_DATA   5
 
#define EI_VERSION   6
 
#define EI_PAD   7
 
#define EI_OSABI   7
 
#define EI_NIDENT   16
 
#define ELFMAG0   0x7f
 
#define ELFMAG1   'E'
 
#define ELFMAG2   'L'
 
#define ELFMAG3   'F'
 
#define ELFCLASSNONE   0
 
#define ELFCLASS32   1
 
#define ELFCLASS64   2
 
#define ELFDATANONE   0
 
#define ELFDATA2LSB   1
 
#define ELFDATA2MSB   2
 
#define EV_NONE   0
 
#define EV_CURRENT   1
 
#define AT_NULL   0
 
#define AT_IGNORE   1
 
#define AT_EXECFD   2
 
#define AT_PHDR   3
 
#define AT_PHENT   4
 
#define AT_PHNUM   5
 
#define AT_PAGESZ   6
 
#define AT_BASE   7
 
#define AT_FLAGS   8
 
#define AT_ENTRY   9
 
#define AT_DCACHEBSIZE   10
 
#define AT_ICACHEBSIZE   11
 
#define AT_UCACHEBSIZE   12
 
#define SHT_NULL   0
 
#define SHT_PROGBITS   1
 
#define SHT_SYMTAB   2
 
#define SHT_STRTAB   3
 
#define SHT_RELA   4
 
#define SHT_HASH   5
 
#define SHT_DYNAMIC   6
 
#define SHT_NOTE   7
 
#define SHT_NOBITS   8
 
#define SHT_REL   9
 
#define SHT_SHLIB   10
 
#define SHT_DYNSYM   11
 
#define SHT_LOPROC   0x70000000
 
#define SHT_HIPROC   0x7fffffff
 
#define SHT_LOUSER   0x80000000
 
#define SHT_HIUSER   0xffffffff
 
#define SHF_WRITE   0x00000001
 
#define SHF_ALLOC   0x00000002
 
#define SHF_EXECINSTR   0x00000004
 
#define SHF_MASKPROC   0xf0000000
 
#define DT_NULL   0
 
#define DT_NEEDED   1
 
#define DT_STRTAB   5
 
#define PF_X   (1 << 0)
 
#define PF_W   (1 << 1)
 
#define PF_R   (1 << 2)
 
#define PF_MASKOS   0x0ff00000
 
#define PF_MASKPROC   0xf0000000
 
#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 STB_LOCAL   0
 
#define STB_GLOBAL   1
 
#define STB_WEAK   2
 
#define STT_NOTYPE   0
 
#define STT_OBJECT   1
 
#define STT_FUNC   2
 
#define STT_SECTION   3
 
#define STT_FILE   4
 
#define PT_NULL   0
 
#define PT_LOAD   1
 
#define PT_DYNAMIC   2
 
#define PT_INTERP   3
 
#define PT_NOTE   4
 
#define PT_SHLIB   5
 
#define PT_PHDR   6
 
#define PT_LOPROC   0x70000000
 
#define PT_HIPROC   0x7fffffff
 
#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 SHN_UNDEF   0
 
#define SHN_LORESERVE   0x0000FF00
 
#define SHN_HIRESERVE   0x0000FFFF
 
#define SHN_ABS   0x0000FFF1
 
#define SHN_COMMON   0x0000FFF2
 

Typedefs

typedef vaddr_t Elf32_Addr
 
typedef u16_t Elf32_Half
 
typedef u32_t Elf32_Off
 
typedef s32_t Elf32_Sword
 
typedef u32_t Elf32_Word
 

Macro Definition Documentation

◆ AT_BASE

#define AT_BASE   7

◆ AT_DCACHEBSIZE

#define AT_DCACHEBSIZE   10

◆ AT_ENTRY

#define AT_ENTRY   9

◆ AT_EXECFD

#define AT_EXECFD   2

◆ AT_FLAGS

#define AT_FLAGS   8

◆ AT_ICACHEBSIZE

#define AT_ICACHEBSIZE   11

◆ AT_IGNORE

#define AT_IGNORE   1

◆ AT_NULL

#define AT_NULL   0

◆ AT_PAGESZ

#define AT_PAGESZ   6

◆ AT_PHDR

#define AT_PHDR   3

◆ AT_PHENT

#define AT_PHENT   4

◆ AT_PHNUM

#define AT_PHNUM   5

◆ AT_UCACHEBSIZE

#define AT_UCACHEBSIZE   12

◆ DT_NEEDED

#define DT_NEEDED   1

◆ DT_NULL

#define DT_NULL   0

◆ DT_STRTAB

#define DT_STRTAB   5

◆ EI_CLASS

#define EI_CLASS   4

◆ EI_DATA

#define EI_DATA   5

◆ 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_NIDENT

#define EI_NIDENT   16

◆ EI_OSABI

#define EI_OSABI   7

◆ EI_PAD

#define EI_PAD   7

◆ EI_VERSION

#define EI_VERSION   6

◆ ELF32_R_INFO

#define ELF32_R_INFO (   s,
 
)    (((s)<<8)+(unsigned char)(t))

◆ ELF32_R_SYM

#define ELF32_R_SYM (   i)    ((i)>>8)

◆ ELF32_R_TYPE

#define ELF32_R_TYPE (   i)    ((unsigned char)(i))

◆ ELF32_ST_BIND

#define ELF32_ST_BIND (   i)    ((i) >> 4)

◆ ELF32_ST_INFO

#define ELF32_ST_INFO (   b,
 
)    (((b)<<4)+((t)&0xf))

◆ ELF32_ST_TYPE

#define ELF32_ST_TYPE (   i)    ((i) & 0xf)

◆ ELFCLASS32

#define ELFCLASS32   1

◆ ELFCLASS64

#define ELFCLASS64   2

◆ ELFCLASSNONE

#define ELFCLASSNONE   0

◆ ELFDATA2LSB

#define ELFDATA2LSB   1

◆ ELFDATA2MSB

#define ELFDATA2MSB   2

◆ ELFDATANONE

#define ELFDATANONE   0

◆ ELFMAG0

#define ELFMAG0   0x7f

◆ ELFMAG1

#define ELFMAG1   'E'

◆ ELFMAG2

#define ELFMAG2   'L'

◆ ELFMAG3

#define ELFMAG3   'F'

◆ ET_CORE

#define ET_CORE   4

◆ ET_DYN

#define ET_DYN   3

◆ ET_EXEC

#define ET_EXEC   2

◆ ET_NONE

#define ET_NONE   0

◆ ET_REL

#define ET_REL   1

◆ EV_CURRENT

#define EV_CURRENT   1

◆ EV_NONE

#define EV_NONE   0

◆ SHF_ALLOC

#define SHF_ALLOC   0x00000002

◆ SHF_EXECINSTR

#define SHF_EXECINSTR   0x00000004

◆ SHF_MASKPROC

#define SHF_MASKPROC   0xf0000000

◆ SHF_WRITE

#define SHF_WRITE   0x00000001

◆ SHN_ABS

#define SHN_ABS   0x0000FFF1

◆ SHN_COMMON

#define SHN_COMMON   0x0000FFF2

◆ SHN_HIRESERVE

#define SHN_HIRESERVE   0x0000FFFF

◆ SHN_LORESERVE

#define SHN_LORESERVE   0x0000FF00

◆ SHN_UNDEF

#define SHN_UNDEF   0

◆ SHT_DYNAMIC

#define SHT_DYNAMIC   6

◆ SHT_DYNSYM

#define SHT_DYNSYM   11

◆ SHT_HASH

#define SHT_HASH   5

◆ SHT_HIPROC

#define SHT_HIPROC   0x7fffffff

◆ SHT_HIUSER

#define SHT_HIUSER   0xffffffff

◆ SHT_LOPROC

#define SHT_LOPROC   0x70000000

◆ SHT_LOUSER

#define SHT_LOUSER   0x80000000

◆ SHT_NOBITS

#define SHT_NOBITS   8

◆ SHT_NOTE

#define SHT_NOTE   7

◆ SHT_NULL

#define SHT_NULL   0

◆ SHT_PROGBITS

#define SHT_PROGBITS   1

◆ SHT_REL

#define SHT_REL   9

◆ SHT_RELA

#define SHT_RELA   4

◆ SHT_SHLIB

#define SHT_SHLIB   10

◆ SHT_STRTAB

#define SHT_STRTAB   3

◆ SHT_SYMTAB

#define SHT_SYMTAB   2

◆ STB_GLOBAL

#define STB_GLOBAL   1

◆ STB_LOCAL

#define STB_LOCAL   0

◆ STB_WEAK

#define STB_WEAK   2

◆ STT_FILE

#define STT_FILE   4

◆ STT_FUNC

#define STT_FUNC   2

◆ STT_NOTYPE

#define STT_NOTYPE   0

◆ STT_OBJECT

#define STT_OBJECT   1

◆ STT_SECTION

#define STT_SECTION   3

Typedef Documentation

◆ Elf32_Addr

◆ Elf32_Half

typedef u16_t Elf32_Half

◆ Elf32_Off

typedef u32_t Elf32_Off

◆ Elf32_Sword

typedef s32_t Elf32_Sword

◆ Elf32_Word

typedef u32_t Elf32_Word