25 #define SHT_PROGBITS 0x1 // The data is contained in the program file. 26 #define SHT_SYMTAB 0x2 // Symbol table 27 #define SHT_STRTAB 0x3 // String table 29 #define SHT_HASH 0x5 // Symbol hash table 30 #define SHT_DYNAMIC 0x6 // Dynamic linking information 32 #define SHT_NOBITS 0x8 // The data is not contained in the program file. 34 #define SHT_DYNSYM 0xb 35 #define SHT_INIT_ARRAY 0xe 36 #define SHT_FINI_ARRAY 0xf 37 #define SHT_PREINIT_ARRAY 0x10 41 #define SHF_EXECINSTR 0x4 42 #define SHF_MASKPROC 0xf0000000 44 #define ELF32_R_SYM(val) ((val) >> 8) 45 #define ELF32_R_TYPE(val) ((val) &0xff) 47 #define ELF32_ST_BIND(i) ((i) >> 4) 48 #define ELF32_ST_TYPE(i) ((i) &0xf) 49 #define ELF32_ST_INFO(b, t) (((b) << 4) + ((t) &0xf)) 50 #define PACKED __attribute__((packed)) 69 Elf32(
const char *name);
80 bool load(uint8_t *pBuffer,
unsigned int nBufferLength);
85 bool load(BootstrapInfo *pBootstrap);
106 const char *
lookupSymbol(
unsigned int addr,
unsigned int *startAddr = 0);
unsigned int getLastAddress()
uint32_t getGlobalOffsetTable()
const char * lookupSymbol(unsigned int addr, unsigned int *startAddr=0)
char * lookupDynamicSymbolName(uint32_t off)
uint32_t lookupDynamicSymbolAddress(uint32_t off)
Elf32 & operator=(const Elf32 &)
uint8_t * m_pBuffer
Offset of the file in memory.
bool load(uint8_t *pBuffer, unsigned int nBufferLength)