Main Page   Modules   Data Structures   File List   Data Fields   Examples  

Symbols
[Symbol Table]


Functions

void melf_symbolSetName (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym, const char *name)
const char * melf_symbolGetName (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym)
void melf_symbolSetValue (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym, Elf32_Addr value)
Elf32_Addr melf_symbolGetValue (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym)
void melf_symbolSetSize (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym, Elf32_Word size)
Elf32_Word melf_symbolGetSize (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym)
void melf_symbolSetBinding (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym, unsigned char binding)
unsigned char melf_symbolGetBinding (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym)
void melf_symbolSetType (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym, unsigned char type)
unsigned char melf_symbolGetType (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym)
void melf_symbolSetSectionIndex (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym, Elf32_Half shndx)
Elf32_Half melf_symbolGetSectionIndex (MELF *melf, ELF_SPEC_HEADER *symTable, Elf32_Sym *sym)

Function Documentation

unsigned char melf_symbolGetBinding MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym
 

Gets the symbol binding information.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
Returns:
Binding information.

const char* melf_symbolGetName MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym
 

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
Returns:
THe name of the symbol.

Elf32_Half melf_symbolGetSectionIndex MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym
 

Gets the section index of the symbol.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
Returns:
The section index.

Elf32_Word melf_symbolGetSize MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym
 

Gets the size of the symbol in virtual memory.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
Returns:
The size of the symbol in virtual memory.

unsigned char melf_symbolGetType MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym
 

Gets the type of the symbol.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
Returns:
The symbol type.

Elf32_Addr melf_symbolGetValue MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym
 

Gets the value associated with the symbol.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
Returns:
The value of the symbol.

void melf_symbolSetBinding MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym,
unsigned char    binding
 

Sets the binding information of the symbol.

binding can be one of the following:

  • STB_LOCAL Local symbol.
  • STB_GLOBAL Global symbol.
  • STB_WEAK Weak symbol.
Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
binding  [in] The symbol binding information.
Examples:
new.c.

void melf_symbolSetName MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym,
const char *    name
 

Sets the name of a given symbol.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
name  [in] The name to set it to.

void melf_symbolSetSectionIndex MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym,
Elf32_Half    shndx
 

Sets the section index of the symbol.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
shndx  [in] The section index.

void melf_symbolSetSize MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym,
Elf32_Word    size
 

Sets the size of the symbol in virtual memory.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
size  [in] The size of the symbol in virtual memory.

void melf_symbolSetType MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym,
unsigned char    type
 

Sets the symbol type.

type can be one of the following:

  • STT_NOTYPE No type.
  • STT_OBJECT Symbol is a data object.
  • STT_FUNC Symbol is a function.
  • STT_SECTION Symbol associated with a section.
  • STT_FILE Symbol's name is a file name.
  • STT_COMMON Symbol is a common data object.
Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
type  [in] The type of the symbol.
Examples:
new.c.

void melf_symbolSetValue MELF   melf,
ELF_SPEC_HEADER   symTable,
Elf32_Sym *    sym,
Elf32_Addr    value
 

Set the value of the sybmol. This is typically the virtual address at which it is found in memory.

Parameters:
melf  [in] The melf context.
symTable  [in] The symbol table to operate on.
sym  [in] The symbol to operate on.
value  [in] The arbitrary value.


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