retdec
|
#include <relocation_table.h>
Public Member Functions | |
Getters | |
std::size_t | getNumberOfRelocations () const |
const Relocation * | getRelocation (std::size_t relocationIndex) const |
const Relocation * | getRelocation (const std::string &name) const |
const Relocation * | getRelocationOnAddress (unsigned long long addr) const |
unsigned long long | getLinkToSymbolTable () const |
Setters | |
void | setLinkToSymbolTable (std::uint64_t symbolTableIndex) |
Iterators | |
relocationsIterator | begin () const |
relocationsIterator | end () const |
Other methods | |
void | clear () |
void | addRelocation (Relocation &relocation) |
bool | hasRelocations () const |
bool | hasRelocation (const std::string &name) const |
bool | hasRelocation (unsigned long long addr) const |
void | dump (std::string &dumpTable) const |
Private Types | |
using | relocationsIterator = std::vector< Relocation >::const_iterator |
Private Attributes | |
std::vector< Relocation > | table |
stored relocations More... | |
unsigned long long | linkToSymbolTable |
link to associated symbol table More... | |
Class for relocation table
|
private |
void retdec::fileformat::RelocationTable::addRelocation | ( | Relocation & | relocation | ) |
Add new relocation to table
relocation | New relocation |
RelocationTable::relocationsIterator retdec::fileformat::RelocationTable::begin | ( | ) | const |
Get begin iterator
void retdec::fileformat::RelocationTable::clear | ( | ) |
Delete all records from table
void retdec::fileformat::RelocationTable::dump | ( | std::string & | dumpTable | ) | const |
Dump information about all relocations in table
dumpTable | Into this parameter is stored dump of relocation table in an LLVM style |
RelocationTable::relocationsIterator retdec::fileformat::RelocationTable::end | ( | ) | const |
Get end iterator
unsigned long long retdec::fileformat::RelocationTable::getLinkToSymbolTable | ( | ) | const |
Returns the link to associated symbol table
std::size_t retdec::fileformat::RelocationTable::getNumberOfRelocations | ( | ) | const |
Get number of relocations in table
const Relocation * retdec::fileformat::RelocationTable::getRelocation | ( | const std::string & | name | ) | const |
Get relocation by name
name | Name of the relocation to get |
nullptr
if such item not found const Relocation * retdec::fileformat::RelocationTable::getRelocation | ( | std::size_t | relocationIndex | ) | const |
Get pointer to relocation from table
relocationIndex | Index of selected relocation (indexed from 0) |
nullptr
if relocation index is invalid const Relocation * retdec::fileformat::RelocationTable::getRelocationOnAddress | ( | unsigned long long | addr | ) | const |
Get pointer to relocation from table
addr | Address of selected relocation |
nullptr
if relocation address is invalid bool retdec::fileformat::RelocationTable::hasRelocation | ( | const std::string & | name | ) | const |
Check if relocation with name name exists
name | Name of relocation |
true
if has relocation with name name, false
otherwise bool retdec::fileformat::RelocationTable::hasRelocation | ( | unsigned long long | addr | ) | const |
Check if relocation on address exists
addr | Adress of relocation |
true
if has relocation on address, false
otherwise bool retdec::fileformat::RelocationTable::hasRelocations | ( | ) | const |
Find out if there are any relocations.
true
if there are some relocations, false
otherwise. void retdec::fileformat::RelocationTable::setLinkToSymbolTable | ( | std::uint64_t | symbolTableIndex | ) |
Set the link to associated symbol table
symbolTableIndex | Index of the symbol table |
|
private |
link to associated symbol table
|
private |
stored relocations