The Pedigree Project
0.1
|
#include <Elf32.h>
Classes | |
struct | Elf32Dyn_t |
struct | Elf32Header_t |
struct | Elf32ProcessHeader_t |
struct | Elf32Rel_t |
struct | Elf32SectionHeader_t |
struct | Elf32Symbol_t |
Public Member Functions | |
Elf32 (const char *name) | |
~Elf32 () | |
bool | load (uint8_t *pBuffer, unsigned int nBufferLength) |
bool | load (BootstrapInfo *pBootstrap) |
bool | writeSections () |
unsigned int | getLastAddress () |
const char * | lookupSymbol (unsigned int addr, unsigned int *startAddr=0) |
uint32_t | lookupDynamicSymbolAddress (uint32_t off) |
char * | lookupDynamicSymbolName (uint32_t off) |
uint32_t | getGlobalOffsetTable () |
uint32_t | getEntryPoint () |
Elf32 (const Elf32 &) | |
Elf32 & | operator= (const Elf32 &) |
Elf32 (const char *name) | |
~Elf32 () | |
bool | load (uint8_t *pBuffer, unsigned int nBufferLength) |
bool | load (BootstrapInfo *pBootstrap) |
bool | writeSections () |
unsigned int | getLastAddress () |
const char * | lookupSymbol (unsigned int addr, unsigned int *startAddr=0) |
uint32_t | lookupDynamicSymbolAddress (uint32_t off) |
char * | lookupDynamicSymbolName (uint32_t off) |
uint32_t | getGlobalOffsetTable () |
uint32_t | getEntryPoint () |
Elf32 (const Elf32 &) | |
Elf32 & | operator= (const Elf32 &) |
Elf32 (const char *name) | |
~Elf32 () | |
bool | load (uint8_t *pBuffer, unsigned int nBufferLength) |
bool | load (BootstrapInfo *pBootstrap) |
bool | writeSections () |
unsigned int | getLastAddress () |
const char * | lookupSymbol (unsigned int addr, unsigned int *startAddr=0) |
uint32_t | lookupDynamicSymbolAddress (uint32_t off) |
char * | lookupDynamicSymbolName (uint32_t off) |
uint32_t | getGlobalOffsetTable () |
uint32_t | getEntryPoint () |
Elf32 (const Elf32 &) | |
Elf32 & | operator= (const Elf32 &) |
Public Attributes | |
struct Elf32::Elf32Header_t | PACKED |
struct Elf32::Elf32ProcessHeader_t | PACKED |
struct Elf32::Elf32SectionHeader_t | PACKED |
struct Elf32::Elf32Symbol_t | PACKED |
struct Elf32::Elf32Dyn_t | PACKED |
struct Elf32::Elf32Rel_t | PACKED |
Elf32Header_t * | m_pHeader |
Elf32SectionHeader_t * | m_pSymbolTable |
Elf32SectionHeader_t * | m_pStringTable |
Elf32SectionHeader_t * | m_pShstrtab |
Elf32SectionHeader_t * | m_pGotTable |
Elf32SectionHeader_t * | m_pRelTable |
Elf32SectionHeader_t * | m_pSectionHeaders |
char | m_pId [128] |
uint8_t * | m_pBuffer |
Offset of the file in memory. | |
Provides an implementation of a 32-bit Executable and Linker format file parser. The ELF data can be loaded either by supplying an entire ELF file in a buffer, or by supplying details of each section seperately.
Definition at line 61 of file arm/Elf32.h.
Elf32::Elf32 | ( | const char * | name | ) |
Default constructor - loads no data.
name | An identifier for this ELF file. This is copied into the class. |
Definition at line 25 of file boot/arm/Elf32.cc.
Elf32::~Elf32 | ( | ) |
Destructor. Doesn't do much.
Definition at line 32 of file boot/arm/Elf32.cc.
Elf32::Elf32 | ( | const Elf32 & | ) |
The copy-constructor
Elf32::Elf32 | ( | const char * | name | ) |
Default constructor - loads no data.
name | An identifier for this ELF file. This is copied into the class. |
Elf32::~Elf32 | ( | ) |
Destructor. Doesn't do much.
Elf32::Elf32 | ( | const Elf32 & | ) |
The copy-constructor
Elf32::Elf32 | ( | const char * | name | ) |
Default constructor - loads no data.
name | An identifier for this ELF file. This is copied into the class. |
Elf32::~Elf32 | ( | ) |
Destructor. Doesn't do much.
Elf32::Elf32 | ( | const Elf32 & | ) |
The copy-constructor
uint32_t Elf32::getEntryPoint | ( | ) |
Returns the entry point of the file.
Definition at line 205 of file boot/arm/Elf32.cc.
uint32_t Elf32::getEntryPoint | ( | ) |
Returns the entry point of the file.
uint32_t Elf32::getEntryPoint | ( | ) |
Returns the entry point of the file.
uint32_t Elf32::getGlobalOffsetTable | ( | ) |
Gets the address of the global offset table.
Definition at line 200 of file boot/arm/Elf32.cc.
uint32_t Elf32::getGlobalOffsetTable | ( | ) |
Gets the address of the global offset table.
uint32_t Elf32::getGlobalOffsetTable | ( | ) |
Gets the address of the global offset table.
unsigned int Elf32::getLastAddress | ( | ) |
Returns the virtual address of the last byte to be written. Used to calculate the sbrk memory breakpoint.
Definition at line 147 of file boot/arm/Elf32.cc.
unsigned int Elf32::getLastAddress | ( | ) |
Returns the virtual address of the last byte to be written. Used to calculate the sbrk memory breakpoint.
unsigned int Elf32::getLastAddress | ( | ) |
Returns the virtual address of the last byte to be written. Used to calculate the sbrk memory breakpoint.
bool Elf32::load | ( | uint8_t * | pBuffer, |
unsigned int | nBufferLength | ||
) |
Constructs an Elf32 object, and assumes the given pointer to be to a contiguous region of memory containing an ELF object.
Definition at line 36 of file boot/arm/Elf32.cc.
References m_pBuffer.
bool Elf32::load | ( | uint8_t * | pBuffer, |
unsigned int | nBufferLength | ||
) |
Constructs an Elf32 object, and assumes the given pointer to be to a contiguous region of memory containing an ELF object.
bool Elf32::load | ( | uint8_t * | pBuffer, |
unsigned int | nBufferLength | ||
) |
Constructs an Elf32 object, and assumes the given pointer to be to a contiguous region of memory containing an ELF object.
bool Elf32::load | ( | BootstrapInfo * | pBootstrap | ) |
Extracts the symbol and string tables from the given BootstrapInfo class.
bool Elf32::load | ( | BootstrapInfo * | pBootstrap | ) |
Extracts the symbol and string tables from the given BootstrapInfo class.
bool Elf32::load | ( | BootstrapInfo * | pBootstrap | ) |
Extracts the symbol and string tables from the given BootstrapInfo class.
uint32_t Elf32::lookupDynamicSymbolAddress | ( | uint32_t | off | ) |
Returns the address of the symbol with offset 'off' in the dynamic relocation table.
Definition at line 190 of file boot/arm/Elf32.cc.
uint32_t Elf32::lookupDynamicSymbolAddress | ( | uint32_t | off | ) |
Returns the address of the symbol with offset 'off' in the dynamic relocation table.
uint32_t Elf32::lookupDynamicSymbolAddress | ( | uint32_t | off | ) |
Returns the address of the symbol with offset 'off' in the dynamic relocation table.
char * Elf32::lookupDynamicSymbolName | ( | uint32_t | off | ) |
Returns a NULL terminated string specifying the name of the symbol at offset 'off' in the relocation symbol table.
Definition at line 195 of file boot/arm/Elf32.cc.
char* Elf32::lookupDynamicSymbolName | ( | uint32_t | off | ) |
Returns a NULL terminated string specifying the name of the symbol at offset 'off' in the relocation symbol table.
char* Elf32::lookupDynamicSymbolName | ( | uint32_t | off | ) |
Returns a NULL terminated string specifying the name of the symbol at offset 'off' in the relocation symbol table.
const char * Elf32::lookupSymbol | ( | unsigned int | addr, |
unsigned int * | startAddr = 0 |
||
) |
Returns the name of the symbol which contains 'addr', and also the starting address of that symbol in 'startAddr' if startAddr != 0.
[in] | addr | The address to look up. |
[out] | startAddr | The starting address of the found symbol (optional). |
Definition at line 152 of file boot/arm/Elf32.cc.
References m_pBuffer.
const char* Elf32::lookupSymbol | ( | unsigned int | addr, |
unsigned int * | startAddr = 0 |
||
) |
Returns the name of the symbol which contains 'addr', and also the starting address of that symbol in 'startAddr' if startAddr != 0.
[in] | addr | The address to look up. |
[out] | startAddr | The starting address of the found symbol (optional). |
const char* Elf32::lookupSymbol | ( | unsigned int | addr, |
unsigned int * | startAddr = 0 |
||
) |
Returns the name of the symbol which contains 'addr', and also the starting address of that symbol in 'startAddr' if startAddr != 0.
[in] | addr | The address to look up. |
[out] | startAddr | The starting address of the found symbol (optional). |
bool Elf32::writeSections | ( | ) |
Writes all writeable sections to their virtual addresses.
Definition at line 119 of file boot/arm/Elf32.cc.
References m_pBuffer.
bool Elf32::writeSections | ( | ) |
Writes all writeable sections to their virtual addresses.
bool Elf32::writeSections | ( | ) |
Writes all writeable sections to their virtual addresses.