Main Page   Modules   Data Structures   File List   Data Fields   Examples  

ELF Header
[The Manipulate ELF library.]


Functions

void melf_elfSetRaw (MELF *melf, Elf32_Ehdr *header)
Elf32_Ehdr * melf_elfGetRaw (MELF *melf)
void melf_elfSetType (MELF *melf, Elf32_Half type)
Elf32_Half melf_elfGetType (MELF *melf)
void melf_elfSetMachine (MELF *melf, Elf32_Half machine)
Elf32_Half melf_elfGetMachine (MELF *melf)
void melf_elfSetVersion (MELF *melf, Elf32_Word version)
Elf32_Word melf_elfGetVersion (MELF *melf)
void melf_elfSetEntry (MELF *melf, Elf32_Addr entry)
Elf32_Addr melf_elfGetEntry (MELF *melf)
void melf_elfSetProgramHeaderOffset (MELF *melf, Elf32_Off offset)
Elf32_Off melf_elfGetProgramHeaderOffset (MELF *melf)
void melf_elfSetSectionHeaderOffset (MELF *melf, Elf32_Off offset)
Elf32_Off melf_elfGetSectionHeaderOffset (MELF *melf)
void melf_elfSetProgramHeaderCount (MELF *melf, Elf32_Half count)
Elf32_Half melf_elfGetProgramHeaderCount (MELF *melf)
void melf_elfSetSectionHeaderEntrySize (MELF *melf, Elf32_Half size)
Elf32_Half melf_elfGetSectionEntrySize (MELF *melf)
void melf_elfSetProgramHeaderEntrySize (MELF *melf, Elf32_Half size)
Elf32_Half melf_elfGetProgramEntrySize (MELF *melf)
void melf_elfSetSectionHeaderCount (MELF *melf, Elf32_Half count)
Elf32_Half melf_elfGetSectionHeaderCount (MELF *melf)
void melf_elfSetStringTableIndex (MELF *melf, Elf32_Half index)
Elf32_Half melf_elfGetStringTableIndex (MELF *melf)

Function Documentation

Elf32_Addr melf_elfGetEntry MELF   melf
 

Gets the entry point virtual address.

Parameters:
melf  [in] The melf context.
Returns:
The entry point virtual address.

Elf32_Half melf_elfGetMachine MELF   melf
 

Get the machine the binary is desgined for.

Parameters:
melf  [in] The melf context.
Returns:
The type of machine.

Elf32_Half melf_elfGetProgramEntrySize MELF   melf
 

Gets the size of program header entries.

Parameters:
melf  [in] The melf context.
Returns:
The size of program header entries.

Elf32_Half melf_elfGetProgramHeaderCount MELF   melf
 

Gets the number of program headers.

Parameters:
melf  [in] The melf context.
Returns:
The number of program headers.

Elf32_Off melf_elfGetProgramHeaderOffset MELF   melf
 

Gets the program header offset.

Parameters:
melf  [in] The melf context.
Returns:
The offset of the program header table.

Elf32_Ehdr* melf_elfGetRaw MELF   melf
 

Gets the raw ELF header for direct access

Parameters:
melf  [in] The melf context
Returns:
The raw ELF header associated with the context

Elf32_Half melf_elfGetSectionEntrySize MELF   melf
 

Gets the size of program header entries.

Parameters:
melf  [in] The melf context.
Returns:
The size of program header entries.

Elf32_Half melf_elfGetSectionHeaderCount MELF   melf
 

Gets the number of section headers.

Parameters:
melf  [in] The melf context.
Returns:
The number of section headers.

Elf32_Off melf_elfGetSectionHeaderOffset MELF   melf
 

Gets the section header offset.

Parameters:
melf  [in] The melf context.
Returns:
The offset of the section header table.

Elf32_Half melf_elfGetStringTableIndex MELF   melf
 

Gets the index of the string table for section headers.

Parameters:
melf  [in] The melf context.
Returns:
The index to the string table header for section headers.

Elf32_Half melf_elfGetType MELF   melf
 

Gets the type of binary associated with the context.

Parameters:
melf  [in] The melf context.
Returns:
The type of binary.

Elf32_Word melf_elfGetVersion MELF   melf
 

Gets the ELF version.

Parameters:
melf  [in] The melf context.
Returns:
The ELF version.

void melf_elfSetEntry MELF   melf,
Elf32_Addr    entry
 

Sets the entry point virtual address.

Parameters:
melf  [in] The melf context.
entry  [in] The entry point virtual address.

void melf_elfSetMachine MELF   melf,
Elf32_Half    machine
 

Sets the machine the binary is designed for (e.g. EM_386)

Parameters:
melf  [in] The melf context.
machine  [in] The type of machine.
Examples:
new.c.

void melf_elfSetProgramHeaderCount MELF   melf,
Elf32_Half    count
 

Sets the number of program headers.

Parameters:
melf  [in] The melf context.
count  [in] The number of program headers.

void melf_elfSetProgramHeaderEntrySize MELF   melf,
Elf32_Half    size
 

Sets the size of program header entries

Parameters:
melf  [in] The melf context.
size  [in] The size of program header entries.

void melf_elfSetProgramHeaderOffset MELF   melf,
Elf32_Off    offset
 

Sets the program header file offset.

Parameters:
melf  [in] The melf context.
offset  [in] The file offset for the program header.

void melf_elfSetRaw MELF   melf,
Elf32_Ehdr *    header
 

Sets the raw ELF header

Parameters:
melf  [in] The melf context
header  [in] The raw ELF header to copy

void melf_elfSetSectionHeaderCount MELF   melf,
Elf32_Half    count
 

Sets the number of section headers.

Parameters:
melf  [in] The melf context.
count  [in] The number of section headers.

void melf_elfSetSectionHeaderEntrySize MELF   melf,
Elf32_Half    size
 

Sets the size of program header entries

Parameters:
melf  [in] The melf context.
size  [in] The size of program header entries.

void melf_elfSetSectionHeaderOffset MELF   melf,
Elf32_Off    offset
 

Sets the section header offset.

Parameters:
melf  [in] The melf context.
offset  [in] The offset of the section header table.

void melf_elfSetStringTableIndex MELF   melf,
Elf32_Half    index
 

Sets the index of the string table for section headers.

Parameters:
melf  [in] The melf context.
index  [in] The index to the string table header for section headers.

void melf_elfSetType MELF   melf,
Elf32_Half    type
 

Sets the type of the binary

The type can be one of the following:

  • ET_NONE No type.
  • ET_REL Relocateable object file.
  • ET_EXEC Executable.
  • ET_DYN Shared object.
  • ET_CORE Core.
Parameters:
melf  [in] The melf context.
type  [in] The type to use.
Examples:
new.c.

void melf_elfSetVersion MELF   melf,
Elf32_Word    version
 

Sets the ELF version. (e.g. EV_CURRENT)

Parameters:
melf  [in] The melf context.
version  [in] The version.


Generated on Tue May 4 00:14:34 2004 for libmelf by doxygen1.2.15