[python api] All information about the ElfRelocationTable python object.
This object is used to represent a Relocation Table entry from the ELF binary format.
>>> binary = Elf('/usr/bin/gdb')
>>> symbols = binary.getSymbolsTable()
>>> relocations = binary.getRelocationTable()
>>> for rel in relocations:
... print hex(rel.getOffset()), symbols[rel.getSymidx()].getName()
Python API - Methods of the ElfRelocationTable class
- ELF getAddend(void)
Returns the relocation addend. This member specifies a constant addend used to compute the value to be stored into the relocatable field.
- ELF getInfo(void)
Returns the relocation info. This member gives both the symbol table index with respect to which the relocation must be made and the type of relocation to apply. Relocation types are processor-specific.
- integer getOffset(void)
Returns the relocation offset. This member gives the location at which to apply the relocation action. For a relocatable file, the value is the byte offset from the beginning of the section to the storage unit affected by the relocation. For an executable file or shared object, the value is the virtual address of the storage unit affected by the relocation.
- integer getSymidx(void)
Returns the relocation symbol index. According to the triton::format::elf::ElfRelocationTable::info value, this field contains the index of the corresponding symbol.
- ELF getType(void)
Returns the type. According to the triton::format::elf::ElfRelocationTable::info value, this field contains the type of the relocation.
- bool isAddend(void)
Returns true if this class is a triton::format::elf::DT_RELA otherwise false if it's a triton::format::elf::DT_REL.