Main Page   Modules   Data Structures   File List   Data Fields   Examples  

The Manipulate ELF library.


Modules

ELF Header
Section Headers
Program Headers
ELF Resources

Data Structures

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)))

Typedefs

typedef _elf_spec_header ELF_SPEC_HEADER
 ELF Specific header.

typedef _elf_spec_header_list ELF_SPEC_HEADER_LIST
 Specific header list.

typedef _melf MELF
 MELF context.


Functions

MELFmelf_new ()
MELFmelf_open (const char *image)
void melf_destroy (MELF *melf)
unsigned long melf_save (MELF *melf, const char *path)

Detailed Description

The manipulate ELF library.

Typedef Documentation

typedef struct _elf_spec_header ELF_SPEC_HEADER
 

ELF Specific header.

Wrappers both section and program headers.

typedef struct _elf_spec_header_list ELF_SPEC_HEADER_LIST
 

Specific header list.

A list that contains one or more specific headers.

typedef struct _melf MELF
 

MELF context.

The melf context used to hold the path to an image as well as the elf, program and section headers.


Function Documentation

void melf_destroy MELF   melf
 

Destroys a MELF context, deallocating all memory associated with it.

Parameters:
melf [in] The context to destroy.
Examples:
new.c.

MELF* melf_new  
 

Creates a blank MELF context.

Returns:
On success, a newly allocated MELF context is returned, otherwise NULL is returned.
Examples:
new.c.

MELF* melf_open const char *    image
 

Translates an ELF image into a MELF context which can then be editted.

Parameters:
image [in] The path to the image to edit.
Returns:
On success, a newly allocated MELF context is returned, otherwise NULL is returned.

unsigned long melf_save MELF   melf,
const char *    path
 

Saves a MELF context in ELF format to the specified path.

Parameters:
melf [in] The context to translate from.
path [in] The path to the image to write to.
Returns:
On success, 1 is returned.
Examples:
new.c.


Generated on Tue Jun 3 00:01:35 2003 for libmelf by doxygen1.3-rc3