retdec
Private Attributes | List of all members
retdec::fileinfo::RelocationTable Class Reference

#include <relocation_table.h>

Collaboration diagram for retdec::fileinfo::RelocationTable:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfStoredRelocations () const
 
std::string getNumberOfStoredRelocationsStr () const
 
std::string getNumberOfDeclaredRelocationsStr () const
 
std::string getTableName () const
 
std::string getAssociatedSymbolTableName () const
 
std::string getAppliesSectionName () const
 
std::string getAssociatedSymbolTableIndex () const
 
std::string getAppliesSectionIndex () const
 
std::string getRelocationSymbolName (std::size_t position) const
 
std::string getRelocationOffsetStr (std::size_t position, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getRelocationSymbolValueStr (std::size_t position) const
 
std::string getRelocationTypeStr (std::size_t position) const
 
std::string getRelocationAddendStr (std::size_t position) const
 
std::string getRelocationCalculatedValueStr (std::size_t position) const
 
Setters
void setTableName (std::string tableName)
 
void setAssociatedSymbolTableName (std::string symbolTableName)
 
void setAppliesSectionName (std::string sectionName)
 
void setAssociatedSymbolTableIndex (unsigned long long index)
 
void setAppliesSectionIndex (unsigned long long index)
 
void setNumberOfDeclaredRelocations (unsigned long long relocations)
 
Other methods
void addRelocation (Relocation &relocation)
 
void clearRelocations ()
 

Private Attributes

std::string name
 name of relocation table More...
 
std::string associatedSymbolTableName
 name of symbol table associated with relocation table More...
 
std::string appliesSectionName
 name of section to which the relocation applies More...
 
unsigned long long associatedSymbolTableIndex = std::numeric_limits<unsigned long long>::max()
 index of symbol table associated with relocation table More...
 
unsigned long long appliesSectionIndex = std::numeric_limits<unsigned long long>::max()
 index of section to which the relocation applies More...
 
unsigned long long declaredRelocations = std::numeric_limits<unsigned long long>::max()
 declared number of relocations in table More...
 
std::vector< Relocationtable
 relocation entries More...
 

Detailed Description

Class for relocation table

Value std::numeric_limits<unsigned long long>::max() mean unspecified value or error for numeric types. Methods with index parameters does not perform control of indexes.

Member Function Documentation

◆ addRelocation()

void retdec::fileinfo::RelocationTable::addRelocation ( Relocation relocation)

Add relocation

Parameters
relocationRelocation

◆ clearRelocations()

void retdec::fileinfo::RelocationTable::clearRelocations ( )

Delete all relocations from table

◆ getAppliesSectionIndex()

std::string retdec::fileinfo::RelocationTable::getAppliesSectionIndex ( ) const

Get index of section to which the relocation applies

Returns
Index of section to which the relocation applies

◆ getAppliesSectionName()

std::string retdec::fileinfo::RelocationTable::getAppliesSectionName ( ) const

Get name of section to which the relocation applies

Returns
Name of section to which the relocation applies

◆ getAssociatedSymbolTableIndex()

std::string retdec::fileinfo::RelocationTable::getAssociatedSymbolTableIndex ( ) const

Get index of symbol table (associated with relocation table)

Returns
Index of symbol table associated with relocation table

◆ getAssociatedSymbolTableName()

std::string retdec::fileinfo::RelocationTable::getAssociatedSymbolTableName ( ) const

Get name of symbol table associated with relocation table

Returns
Name of symbol table associated with relocation table

◆ getNumberOfDeclaredRelocationsStr()

std::string retdec::fileinfo::RelocationTable::getNumberOfDeclaredRelocationsStr ( ) const

Get number of declared relocations in table

Returns
Number of relocations in table

Returned value indicates the declared number of relocations stored in file table. This number may not be as large as result of method getNumberOfStoredRelocations().

◆ getNumberOfStoredRelocations()

std::size_t retdec::fileinfo::RelocationTable::getNumberOfStoredRelocations ( ) const

Get number of relocations in table

Returns
Number of relocations in table

Returned value indicates the number of relocations stored in this instance. This number may not be as large as result of method getNumberOfDeclaredRelocations().

◆ getNumberOfStoredRelocationsStr()

std::string retdec::fileinfo::RelocationTable::getNumberOfStoredRelocationsStr ( ) const

Get number of stored relocations in table

Returns
Number of relocations in table

◆ getRelocationAddendStr()

std::string retdec::fileinfo::RelocationTable::getRelocationAddendStr ( std::size_t  position) const

Get relocation addend

Parameters
positionPosition of relocation entry in table (0..x)
Returns
Relocation addend

◆ getRelocationCalculatedValueStr()

std::string retdec::fileinfo::RelocationTable::getRelocationCalculatedValueStr ( std::size_t  position) const

Get relocation calculated value

Parameters
positionPosition of relocation entry in table (0..x)
Returns
Relocation calculated value

◆ getRelocationOffsetStr()

std::string retdec::fileinfo::RelocationTable::getRelocationOffsetStr ( std::size_t  position,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get relocation offset

Parameters
positionPosition of relocation entry in table (0..x)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Relocation offset

◆ getRelocationSymbolName()

std::string retdec::fileinfo::RelocationTable::getRelocationSymbolName ( std::size_t  position) const

Get name of symbol associated with relocation

Parameters
positionPosition of relocation entry in table (0..x)
Returns
Name of symbol associated with relocation

◆ getRelocationSymbolValueStr()

std::string retdec::fileinfo::RelocationTable::getRelocationSymbolValueStr ( std::size_t  position) const

Get value of symbol associated with relocation

Parameters
positionPosition of relocation entry in table (0..x)
Returns
Value of symbol associated with relocation

◆ getRelocationTypeStr()

std::string retdec::fileinfo::RelocationTable::getRelocationTypeStr ( std::size_t  position) const

Get type of relocation

Parameters
positionPosition of relocation entry in table (0..x)
Returns
Type of relocation

◆ getTableName()

std::string retdec::fileinfo::RelocationTable::getTableName ( ) const

Get name of relocation table

Returns
Name of relocation table

◆ setAppliesSectionIndex()

void retdec::fileinfo::RelocationTable::setAppliesSectionIndex ( unsigned long long  index)

Set index of section to which the relocation applies

Parameters
indexIndex of section to which the relocation applies

◆ setAppliesSectionName()

void retdec::fileinfo::RelocationTable::setAppliesSectionName ( std::string  sectionName)

Set name of section to which the relocation applies

Parameters
sectionNameName of section to which the relocation applies

◆ setAssociatedSymbolTableIndex()

void retdec::fileinfo::RelocationTable::setAssociatedSymbolTableIndex ( unsigned long long  index)

Set index of associated symbol table

Parameters
indexIndex of associated symbol table

◆ setAssociatedSymbolTableName()

void retdec::fileinfo::RelocationTable::setAssociatedSymbolTableName ( std::string  symbolTableName)

Set name of associated symbol table

Parameters
symbolTableNameName of associated symbol table

◆ setNumberOfDeclaredRelocations()

void retdec::fileinfo::RelocationTable::setNumberOfDeclaredRelocations ( unsigned long long  relocations)

Set declared number of relocations in table

Parameters
relocationsDeclared number of relocations in table

◆ setTableName()

void retdec::fileinfo::RelocationTable::setTableName ( std::string  tableName)

Set name of relocation table

Parameters
tableNameName of relocation table

Member Data Documentation

◆ appliesSectionIndex

unsigned long long retdec::fileinfo::RelocationTable::appliesSectionIndex = std::numeric_limits<unsigned long long>::max()
private

index of section to which the relocation applies

◆ appliesSectionName

std::string retdec::fileinfo::RelocationTable::appliesSectionName
private

name of section to which the relocation applies

◆ associatedSymbolTableIndex

unsigned long long retdec::fileinfo::RelocationTable::associatedSymbolTableIndex = std::numeric_limits<unsigned long long>::max()
private

index of symbol table associated with relocation table

◆ associatedSymbolTableName

std::string retdec::fileinfo::RelocationTable::associatedSymbolTableName
private

name of symbol table associated with relocation table

◆ declaredRelocations

unsigned long long retdec::fileinfo::RelocationTable::declaredRelocations = std::numeric_limits<unsigned long long>::max()
private

declared number of relocations in table

◆ name

std::string retdec::fileinfo::RelocationTable::name
private

name of relocation table

◆ table

std::vector<Relocation> retdec::fileinfo::RelocationTable::table
private

relocation entries


The documentation for this class was generated from the following files: