Modules | |
ELF Header | |
Section Headers | |
Program Headers | |
ELF Resources | |
Data Structures | |
struct | _elf_section_entry |
struct | _elf_spec_header |
ELF Specific header. More... | |
struct | _elf_spec_header_list |
Specific header list. More... | |
struct | _melf |
MELF context. More... | |
Defines | |
#define | IS_OVERFLOW(melf, base, addr) ((melf)->imageSize < ((unsigned long)(addr) - (unsigned long)(base))) |
#define | MELF_ACCESS_READ (1 << 0) |
#define | MELF_ACCESS_WRITE (1 << 1) |
#define | MELF_ACCESS_ALL (MELF_ACCESS_READ | MELF_ACCESS_WRITE) |
#define | MELF_HAS_ACCESS(ctx, flag) ((ctx)->access & (flag)) |
Typedefs | |
typedef _elf_spec_header | ELF_SPEC_HEADER |
ELF Specific header. More... | |
typedef _elf_spec_header_list | ELF_SPEC_HEADER_LIST |
Specific header list. More... | |
typedef _elf_section_entry | ELF_SECTION_ENTRY |
typedef _melf | MELF |
MELF context. More... | |
Enumerations | |
enum | ElfHeaderType { ELF_HEADER_TYPE_SECTION = 0, ELF_HEADER_TYPE_PROGRAM = 1 } |
Functions | |
MELF * | melf_new () |
MELF * | melf_open (const char *image, int access) |
void | melf_destroy (MELF *melf) |
unsigned long | melf_synchronize (MELF *melf) |
unsigned long | melf_save (MELF *melf, const char *path) |
unsigned long | melf_version () |
|
Opening the ELF object for reading and writing. |
|
Opening the ELF object for reading. |
|
Opening the ELF object for writing. |
|
Checks to see if the context has been opened readonly |
|
ELF Specific header. Wrappers both section and program headers. |
|
Specific header list. A list that contains one or more specific headers. |
|
MELF context. The melf context used to hold the path to an image as well as the elf, program and section headers. |
|
The ELF header type enumeration includes section and program. |
|
Destroys a MELF context, deallocating all memory associated with it.
|
|
Creates a blank MELF context.
|
|
Translates an ELF image into a MELF context which can then be editted. The access parameter can be one of the following:
|
|
Saves a MELF context in ELF format to the specified path.
|
|
Synchronizes the section and program headers as far as alignment and offsetting is concerned. This is an integral part of the saving process and can be used to make the in-memory version of the library appear as it would on disk if it were to be saved.
|
|
Returns the version of the melf library.
|