RetroArch
Classes | Enumerations | Functions | Variables
elf Namespace Reference

Classes

struct  Header
 
struct  Rela
 
struct  RplCrc
 
struct  RplExport
 
struct  RplFileInfo
 
struct  RplImport
 
struct  SectionHeader
 
struct  Symbol
 

Enumerations

enum  Machine : uint32_t { EM_PPC = 20 }
 
enum  Encoding : uint32_t { ELFDATANONE = 0, ELFDATA2LSB = 1, ELFDATA2MSB = 2 }
 
enum  Class : uint32_t { ELFCLASSNONE = 0, ELFCLASS32 = 1, ELFCLASS64 = 2 }
 
enum  Version : uint32_t { EV_NONE = 0, EV_CURRENT = 1 }
 
enum  FileType : uint32_t {
  ET_NONE = 0, ET_REL = 1, ET_EXEC = 2, ET_DYN = 3,
  ET_CORE = 4, ET_LOPROC = 0xff00, ET_CAFE_RPL = 0xff01, ET_HIPROC = 0xffff
}
 
enum  EABI : uint32_t { EABI_CAFE = 0xcafe }
 
enum  SectionFlags : uint32_t {
  SHF_WRITE = 0x1, SHF_ALLOC = 0x2, SHF_EXECINSTR = 0x4, SHF_DEFLATED = 0x08000000,
  SHF_MASKPROC = 0xF0000000
}
 
enum  SectionType : uint32_t {
  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_LOPROC = 0x70000000, SHT_HIPROC = 0x7fffffff, SHT_LOUSER = 0x80000000,
  SHT_RPL_EXPORTS = 0x80000001, SHT_RPL_IMPORTS = 0x80000002, SHT_RPL_CRCS = 0x80000003, SHT_RPL_FILEINFO = 0x80000004,
  SHT_HIUSER = 0xffffffff
}
 
enum  SymbolBinding : uint32_t {
  STB_LOCAL = 0, STB_GLOBAL = 1, STB_WEAK = 2, STB_GNU_UNIQUE = 10,
  STB_LOOS = 10, STB_HIOS = 12, STB_LOPROC = 13, STB_HIPROC = 15
}
 
enum  SymbolType : uint32_t {
  STT_NOTYPE = 0, STT_OBJECT = 1, STT_FUNC = 2, STT_SECTION = 3,
  STT_FILE = 4, STT_COMMON = 5, STT_TLS = 6, STT_LOOS = 7,
  STT_HIOS = 8, STT_GNU_IFUNC = 10, STT_LOPROC = 13, STT_HIPROC = 15
}
 
enum  SectionIndex : uint16_t {
  SHN_UNDEF = 0, SHN_LORESERVE = 0xff00, SHN_ABS = 0xfff1, SHN_COMMON = 0xfff2,
  SHN_XINDEX = 0xffff, SHN_HIRESERVE = 0xffff
}
 
enum  RelocationType : uint32_t {
  R_PPC_NONE = 0, R_PPC_ADDR32 = 1, R_PPC_ADDR24 = 2, R_PPC_ADDR16 = 3,
  R_PPC_ADDR16_LO = 4, R_PPC_ADDR16_HI = 5, R_PPC_ADDR16_HA = 6, R_PPC_ADDR14 = 7,
  R_PPC_ADDR14_BRTAKEN = 8, R_PPC_ADDR14_BRNTAKEN = 9, R_PPC_REL24 = 10, R_PPC_REL14 = 11,
  R_PPC_REL14_BRTAKEN = 12, R_PPC_REL14_BRNTAKEN = 13, R_PPC_GOT16 = 14, R_PPC_GOT16_LO = 15,
  R_PPC_GOT16_HI = 16, R_PPC_GOT16_HA = 17, R_PPC_PLTREL24 = 18, R_PPC_JMP_SLOT = 21,
  R_PPC_RELATIVE = 22, R_PPC_LOCAL24PC = 23, R_PPC_REL32 = 26, R_PPC_TLS = 67,
  R_PPC_DTPMOD32 = 68, R_PPC_TPREL16 = 69, R_PPC_TPREL16_LO = 70, R_PPC_TPREL16_HI = 71,
  R_PPC_TPREL16_HA = 72, R_PPC_TPREL32 = 73, R_PPC_DTPREL16 = 74, R_PPC_DTPREL16_LO = 75,
  R_PPC_DTPREL16_HI = 76, R_PPC_DTPREL16_HA = 77, R_PPC_DTPREL32 = 78, R_PPC_GOT_TLSGD16 = 79,
  R_PPC_GOT_TLSGD16_LO = 80, R_PPC_GOT_TLSGD16_HI = 81, R_PPC_GOT_TLSGD16_HA = 82, R_PPC_GOT_TLSLD16 = 83,
  R_PPC_GOT_TLSLD16_LO = 84, R_PPC_GOT_TLSLD16_HI = 85, R_PPC_GOT_TLSLD16_HA = 86, R_PPC_GOT_TPREL16 = 87,
  R_PPC_GOT_TPREL16_LO = 88, R_PPC_GOT_TPREL16_HI = 89, R_PPC_GOT_TPREL16_HA = 90, R_PPC_GOT_DTPREL16 = 91,
  R_PPC_GOT_DTPREL16_LO = 92, R_PPC_GOT_DTPREL16_HI = 93, R_PPC_GOT_DTPREL16_HA = 94, R_PPC_TLSGD = 95,
  R_PPC_TLSLD = 96, R_PPC_EMB_SDA21 = 109, R_PPC_REL16 = 249, R_PPC_REL16_LO = 250,
  R_PPC_REL16_HI = 251, R_PPC_REL16_HA = 252
}
 
enum  RplFileInfoFlag : uint32_t { RPL_IS_RPX = 0x2 }
 

Functions

 CHECK_SIZE (Header, 0x34)
 
 CHECK_SIZE (SectionHeader, 0x28)
 
 CHECK_SIZE (Symbol, 0x10)
 
 CHECK_SIZE (Rela, 0x0C)
 
 CHECK_SIZE (RplCrc, 0x04)
 
 CHECK_SIZE (RplFileInfo, 0x60)
 

Variables

static const unsigned HeaderMagic = 0x7f454c46
 

Enumeration Type Documentation

◆ Class

Enumerator
ELFCLASSNONE 
ELFCLASS32 
ELFCLASS64 

◆ EABI

Enumerator
EABI_CAFE 

◆ Encoding

Enumerator
ELFDATANONE 
ELFDATA2LSB 
ELFDATA2MSB 

◆ FileType

Enumerator
ET_NONE 
ET_REL 
ET_EXEC 
ET_DYN 
ET_CORE 
ET_LOPROC 
ET_CAFE_RPL 
ET_HIPROC 

◆ Machine

Enumerator
EM_PPC 

◆ RelocationType

Enumerator
R_PPC_NONE 
R_PPC_ADDR32 
R_PPC_ADDR24 
R_PPC_ADDR16 
R_PPC_ADDR16_LO 
R_PPC_ADDR16_HI 
R_PPC_ADDR16_HA 
R_PPC_ADDR14 
R_PPC_ADDR14_BRTAKEN 
R_PPC_ADDR14_BRNTAKEN 
R_PPC_REL24 
R_PPC_REL14 
R_PPC_REL14_BRTAKEN 
R_PPC_REL14_BRNTAKEN 
R_PPC_GOT16 
R_PPC_GOT16_LO 
R_PPC_GOT16_HI 
R_PPC_GOT16_HA 
R_PPC_PLTREL24 
R_PPC_JMP_SLOT 
R_PPC_RELATIVE 
R_PPC_LOCAL24PC 
R_PPC_REL32 
R_PPC_TLS 
R_PPC_DTPMOD32 
R_PPC_TPREL16 
R_PPC_TPREL16_LO 
R_PPC_TPREL16_HI 
R_PPC_TPREL16_HA 
R_PPC_TPREL32 
R_PPC_DTPREL16 
R_PPC_DTPREL16_LO 
R_PPC_DTPREL16_HI 
R_PPC_DTPREL16_HA 
R_PPC_DTPREL32 
R_PPC_GOT_TLSGD16 
R_PPC_GOT_TLSGD16_LO 
R_PPC_GOT_TLSGD16_HI 
R_PPC_GOT_TLSGD16_HA 
R_PPC_GOT_TLSLD16 
R_PPC_GOT_TLSLD16_LO 
R_PPC_GOT_TLSLD16_HI 
R_PPC_GOT_TLSLD16_HA 
R_PPC_GOT_TPREL16 
R_PPC_GOT_TPREL16_LO 
R_PPC_GOT_TPREL16_HI 
R_PPC_GOT_TPREL16_HA 
R_PPC_GOT_DTPREL16 
R_PPC_GOT_DTPREL16_LO 
R_PPC_GOT_DTPREL16_HI 
R_PPC_GOT_DTPREL16_HA 
R_PPC_TLSGD 
R_PPC_TLSLD 
R_PPC_EMB_SDA21 
R_PPC_REL16 
R_PPC_REL16_LO 
R_PPC_REL16_HI 
R_PPC_REL16_HA 

◆ RplFileInfoFlag

Enumerator
RPL_IS_RPX 

◆ SectionFlags

Enumerator
SHF_WRITE 
SHF_ALLOC 
SHF_EXECINSTR 
SHF_DEFLATED 
SHF_MASKPROC 

◆ SectionIndex

Enumerator
SHN_UNDEF 
SHN_LORESERVE 
SHN_ABS 
SHN_COMMON 
SHN_XINDEX 
SHN_HIRESERVE 

◆ SectionType

Enumerator
SHT_NULL 
SHT_PROGBITS 
SHT_SYMTAB 
SHT_STRTAB 
SHT_RELA 
SHT_HASH 
SHT_DYNAMIC 
SHT_NOTE 
SHT_NOBITS 
SHT_REL 
SHT_SHLIB 
SHT_DYNSYM 
SHT_INIT_ARRAY 
SHT_FINI_ARRAY 
SHT_PREINIT_ARRAY 
SHT_GROUP 
SHT_SYMTAB_SHNDX 
SHT_LOPROC 
SHT_HIPROC 
SHT_LOUSER 
SHT_RPL_EXPORTS 
SHT_RPL_IMPORTS 
SHT_RPL_CRCS 
SHT_RPL_FILEINFO 
SHT_HIUSER 

◆ SymbolBinding

Enumerator
STB_LOCAL 
STB_GLOBAL 
STB_WEAK 
STB_GNU_UNIQUE 
STB_LOOS 
STB_HIOS 
STB_LOPROC 
STB_HIPROC 

◆ SymbolType

Enumerator
STT_NOTYPE 
STT_OBJECT 
STT_FUNC 
STT_SECTION 
STT_FILE 
STT_COMMON 
STT_TLS 
STT_LOOS 
STT_HIOS 
STT_GNU_IFUNC 
STT_LOPROC 
STT_HIPROC 

◆ Version

Enumerator
EV_NONE 
EV_CURRENT 

Function Documentation

◆ CHECK_SIZE() [1/6]

elf::CHECK_SIZE ( Header  ,
0x34   
)

◆ CHECK_SIZE() [2/6]

elf::CHECK_SIZE ( SectionHeader  ,
0x28   
)

◆ CHECK_SIZE() [3/6]

elf::CHECK_SIZE ( Symbol  ,
0x10   
)

◆ CHECK_SIZE() [4/6]

elf::CHECK_SIZE ( Rela  ,
0x0C   
)

◆ CHECK_SIZE() [5/6]

elf::CHECK_SIZE ( RplCrc  ,
0x04   
)

◆ CHECK_SIZE() [6/6]

elf::CHECK_SIZE ( RplFileInfo  ,
0x60   
)

Variable Documentation

◆ HeaderMagic

const unsigned elf::HeaderMagic = 0x7f454c46
static