Main Page   Modules   Data Structures   File List   Data Fields   Examples  

Program Headers
[The Manipulate ELF library.]


Functions

ELF_SPEC_HEADERmelf_programAdd (MELF *melf)
ELF_SPEC_HEADERmelf_programGetEnum (MELF *melf)
ELF_SPEC_HEADERmelf_programEnumNext (MELF *melf, ELF_SPEC_HEADER *en)
ELF_SPEC_HEADERmelf_programEnumPrev (MELF *melf, ELF_SPEC_HEADER *en)
void melf_programSetType (MELF *melf, ELF_SPEC_HEADER *program, Elf32_Word type)
Elf32_Word melf_programGetType (MELF *melf, ELF_SPEC_HEADER *program)
void melf_programSetVirtualAddress (MELF *melf, ELF_SPEC_HEADER *program, Elf32_Addr addr)
Elf32_Addr melf_programGetVirtualAddress (MELF *melf, ELF_SPEC_HEADER *program)
void melf_programSetPhysicalAddress (MELF *melf, ELF_SPEC_HEADER *program, Elf32_Addr addr)
Elf32_Addr melf_programGetPhysicalAddress (MELF *melf, ELF_SPEC_HEADER *program)
void melf_programSetVirtualSize (MELF *melf, ELF_SPEC_HEADER *program, Elf32_Word size)
Elf32_Word melf_programGetVirtualSize (MELF *melf, ELF_SPEC_HEADER *program)
void melf_programSetPhysicalSize (MELF *melf, ELF_SPEC_HEADER *program, Elf32_Word size)
Elf32_Word melf_programGetPhysicalSize (MELF *melf, ELF_SPEC_HEADER *program)
void melf_programSetFlags (MELF *melf, ELF_SPEC_HEADER *program, Elf32_Word flags)
Elf32_Word melf_programGetFlags (MELF *melf, ELF_SPEC_HEADER *program)
unsigned long melf_programRemove (MELF *melf, unsigned long id)

Function Documentation

ELF_SPEC_HEADER* melf_programAdd MELF   melf
 

Adds a new program header.

Parameters:
melf  [in] The melf context.
Returns:
On success, a new blank program headeris returned.

ELF_SPEC_HEADER* melf_programEnumNext MELF   melf,
ELF_SPEC_HEADER   en
 

Gets the next entry in the program header enumeration.

Parameters:
melf  [in] The melf context.
en  [in] The current enumeration pointer.
Returns:
The next header in the enumeration.

ELF_SPEC_HEADER* melf_programEnumPrev MELF   melf,
ELF_SPEC_HEADER   en
 

Gets the previous entry in the program header enumeration.

Parameters:
melf  [in] The melf context.
en  [in] The current enumeration pointer.
Returns:
The previous header in the enumeration.

ELF_SPEC_HEADER* melf_programGetEnum MELF   melf
 

Gets an enumerator for the program header table.

Parameters:
melf  [in] The melf context.
Returns:
On success, a pointer to the first entry in the program enumeration is returned, otherwise NULL is returned.

Elf32_Word melf_programGetFlags MELF   melf,
ELF_SPEC_HEADER   program
 

Gets the flags associated with a program header.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
Returns:
The program header flags.

Elf32_Addr melf_programGetPhysicalAddress MELF   melf,
ELF_SPEC_HEADER   program
 

Gets the physical address associated with a program header.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
Returns:
The physical address.

Elf32_Word melf_programGetPhysicalSize MELF   melf,
ELF_SPEC_HEADER   program
 

Gets the physical size of the program segment.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
Returns:
The physical size of the program segment.

Elf32_Word melf_programGetType MELF   melf,
ELF_SPEC_HEADER   program
 

Gets the type of a program header.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
Returns:
The type of a program header.

Elf32_Addr melf_programGetVirtualAddress MELF   melf,
ELF_SPEC_HEADER   program
 

Gets the virtual address associated with a program header.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
Returns:
The virtual address.

Elf32_Word melf_programGetVirtualSize MELF   melf,
ELF_SPEC_HEADER   program
 

Gets the virtual size of the program segment.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
Returns:
The virtual size of the program segment.

unsigned long melf_programRemove MELF   melf,
unsigned long    id
 

Removes a program header of a given identifier.

Parameters:
melf  [in] The melf context.
id  [in] The identifier of the program header to be removed.
Returns:
1 on success.

void melf_programSetFlags MELF   melf,
ELF_SPEC_HEADER   program,
Elf32_Word    flags
 

Sets the flags on the program header.

flags can be one or more of the following:

  • PF_R Readable.
  • PF_W Writable.
  • PF_X Executable.
Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
flags  [in] The flags to set.

void melf_programSetPhysicalAddress MELF   melf,
ELF_SPEC_HEADER   program,
Elf32_Addr    addr
 

Sets the physical address associated with a program header.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
addr  [in] The physical address to set to.

void melf_programSetPhysicalSize MELF   melf,
ELF_SPEC_HEADER   program,
Elf32_Word    size
 

Sets the physical size of the program segment.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
size  [in] The physical size of the program segment.

void melf_programSetType MELF   melf,
ELF_SPEC_HEADER   program,
Elf32_Word    type
 

Set the program header type.

type can be one of the following:

  • PT_LOAD Loadable segment.
  • PT_DYNAMIC Dynamic linking information.
  • PT_INTERP Program interpreter.
  • PT_NOTE Auxiliary information.
  • PT_PHDR Program header table.
  • PT_TLS Thread-local storage.
Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
type  [in] The type to set it to.

void melf_programSetVirtualAddress MELF   melf,
ELF_SPEC_HEADER   program,
Elf32_Addr    addr
 

Sets the virtual address associated with a program header.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
addr  [in] The virtual address to set to.

void melf_programSetVirtualSize MELF   melf,
ELF_SPEC_HEADER   program,
Elf32_Word    size
 

Sets the virtual size of the program segment.

Parameters:
melf  [in] The melf context.
program  [in] The program header to operate on.
size  [in] The virtual size.


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