Main Page   Modules   Data Structures   File List   Data Fields   Examples  

Symbol Table
[Section Headers]


Modules

Symbols

Functions

ELF_SPEC_HEADERmelf_symbolTableCreate (MELF *melf, const char *name)
void melf_symbolTableInitializeEntryList (MELF *melf, ELF_SPEC_HEADER *sect)
void melf_symbolTableSynchronizeEntryList (MELF *melf, ELF_SPEC_HEADER *sect)
Elf32_Sym * melf_symbolTableAddSymbol (MELF *melf, ELF_SPEC_HEADER *symTable, const char *name)
Elf32_Sym * melf_symbolTableEnum (MELF *melf, ELF_SPEC_HEADER *symTable, unsigned long index)
unsigned long melf_symbolTableRemoveSymbol (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *symbol)
unsigned long melf_symbolTableRecalculateOffsets (MELF *melf, ELF_SPEC_HEADER *relatedSection, unsigned long offset, unsigned long contentLength)

Function Documentation

Elf32_Sym* melf_symbolTableAddSymbol MELF   melf,
ELF_SPEC_HEADER   symTable,
const char *    name
 

Adds a new symbol with the given name to the symbol table.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
name  [in] The name of the symbol. This can be NULL.
Examples:
new.c.

ELF_SPEC_HEADER* melf_symbolTableCreate MELF   melf,
const char *    name
 

Creates a symbol table with the specified name.

Parameters:
melf  [in] The melf context.
name  [in] The name of the symbol table. This can be NULL.
Returns:
On success, an initialized symbol table section is returned. Otherwise, NULL is returned.
Examples:
new.c.

Elf32_Sym* melf_symbolTableEnum MELF   melf,
ELF_SPEC_HEADER   symTable,
unsigned long    index
 

Enumerates the symbol table at the given index. Indexes start at 0.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
index  [in] The index to enumerate at.
Returns:
If the index is valid, a valid pointer to a symbol will be returned. Otherwise, NULL is returned.

void melf_symbolTableInitializeEntryList MELF   melf,
ELF_SPEC_HEADER   sect
 

Initializes the entry list for the given section. It is not recommended that this function be called directly.

Parameters:
melf  [in] The melf context.
sect  [in] The section that is being operated on.

unsigned long melf_symbolTableRecalculateOffsets MELF   melf,
ELF_SPEC_HEADER   relatedSection,
unsigned long    offset,
unsigned long    contentLength
 

Adjusts offsets of symbols in a related section.

Parameters:
melf  [in] The melf context.
relatedSection  [in] The section that has been modified and is potentially related to some symbol tables.
offset  [in] The offset at which new content was inserted.
contentLength  [in] The length of the content that was inserted.
Returns:
On success, the number of symbols adjusted is returned. Otherwise, 0 is returned if none were adjusted.

unsigned long melf_symbolTableRemoveSymbol MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    symbol
 

Removes a given symbol.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
symbol  [in] The symbol to remove.
Returns:
1 on success.

void melf_symbolTableSynchronizeEntryList MELF   melf,
ELF_SPEC_HEADER   sect
 

Synchronizes the entry list for the given section. It is not recommended that this function be called directly.

Parameters:
melf  [in] The melf context.
sect  [in] The section that is being operated on.


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