libTriton  version 0.4 build 1356
ElfSymbolTable

[python api] All information about the ElfSymbolTable python object.

Description

This object is used to represent a Section Header entry from the ELF binary format.

Example

>>> binary = Elf('/usr/bin/gdb')
>>> syms = binary.getSymbolsTable()
>>> for sym in syms:
... print sym.getName()
...
PyList_Insert
PyInt_GetMax
scrollok
def_shell_mode
ctime
chmod
tcsetattr
PySys_GetObject
PyDict_SetItemString
pipe2
chdir
fileno
dup2
[...]

Python API - Methods of the ElfSymbolTable class

• integer getIdxname(void)
Returns the section index name. This member holds an index into the object file's symbol string table, which holds the character representations of the symbol names. If the value is non-zero, it represents a string table index that gives the symbol name. Otherwise, the symbol table entry has no name.
• ELF getInfo(void)
Returns the section info. This member specifies the symbol's type and binding attributes. A list of the values and meanings appears below.
• string getName(void)
Returns the section name. This member specifies the name of the symbol as string based on the triton::format::elf::ElfSymbolTable::idxname.
e.g: main
• ELF getOther(void)
Returns the other field of the symbol table structure. This member currently specifies a symbol's visibility.
• integer getShndx(void)
Returns the shndx field of the symbol table structure. Every symbol table entry is defined in relation to some section. This member holds the relevant section header table index. As the sh_link and sh_info interpretation table and the related text describe, some section indexes indicate special meanings. If this member contains triton::format::elf::SHN_XINDEX, then the actual section header index is too large to fit in this field. The actual value is contained in the associated section of type triton::format::elf::SHT_SYMTAB_SHNDX.
• integer getSize(void)
Returns the section size. Many symbols have associated sizes. For example, a data object's size is the number of bytes contained in the object. This member holds 0 if the symbol has no size or an unknown size.
• integer getValue(void)
Returns the symbol value. This member gives the value of the associated symbol. Depending on the context, this may be an absolute value, an address, and so on.