retdec
Private Attributes | List of all members
retdec::fileformat::Relocation Class Reference

#include <relocation.h>

Collaboration diagram for retdec::fileformat::Relocation:
Collaboration graph
[legend]

Public Member Functions

Getters
std::string getName () const
 
unsigned long long getAddress () const
 
unsigned long long getSectionOffset () const
 
bool getLinkToSection (unsigned long long &sectionIndex) const
 
bool getLinkToSymbol (unsigned long long &symbolIndex) const
 
unsigned long long getAddend () const
 
unsigned long long getType () const
 
std::vector< std::uint8_t > getMask () const
 
Setters
void setName (std::string relocationName)
 
void setAddress (unsigned long long relocationAddress)
 
void setSectionOffset (unsigned long long relocationOffsetInSection)
 
void setLinkToSection (unsigned long long relocationLinkToSection)
 
void setLinkToSymbol (unsigned long long relocationLinkToSymbol)
 
void setAddend (unsigned long long relocationAddend)
 
void setType (unsigned long long relocationType)
 
void setMask (const std::vector< std::uint8_t > &relocationMask)
 
Other methods
void invalidateLinkToSection ()
 
void invalidateLinkToSymbol ()
 
bool hasEmptyName () const
 

Private Attributes

std::string name
 relocation name More...
 
unsigned long long address = 0
 address at which to apply the relocation More...
 
unsigned long long offsetInSection = 0
 offset of relocation in section at which to apply the relocation More...
 
unsigned long long linkToSection = 0
 link to section at which relocation is applied More...
 
unsigned long long linkToSymbol = 0
 link to symbol which is used for calculating relocations More...
 
unsigned long long addend = 0
 addend of relocation More...
 
unsigned long long type = 0
 type of relocation More...
 
bool linkToSectionIsValid = false
 true if link to section is valid More...
 
bool linkToSymbolIsValid = false
 true if link to symbol is valid More...
 
std::vector< std::uint8_t > mask
 relocation mask More...
 

Detailed Description

One relocation

Member Function Documentation

◆ getAddend()

unsigned long long retdec::fileformat::Relocation::getAddend ( ) const

Get addend of relocation

Returns
Addend of the relocation

◆ getAddress()

unsigned long long retdec::fileformat::Relocation::getAddress ( ) const

Get address at which to apply the relocation

Returns
Address at which to apply the relocation

◆ getLinkToSection()

bool retdec::fileformat::Relocation::getLinkToSection ( unsigned long long &  sectionIndex) const

Get link to section at which relocations are applied

Parameters
sectionIndexParameter for store the result
Returns
true if link to section is valid, false otherwise

If method returns false, sectionIndex is left unchanged

◆ getLinkToSymbol()

bool retdec::fileformat::Relocation::getLinkToSymbol ( unsigned long long &  symbolIndex) const

Get link to symbol which is used for relocation calculation

Parameters
symbolIndexParameter for store the result
Returns
true if link to symbol is valid, false otherwise

If method returns false, symbolIndex is left unchanged

◆ getMask()

std::vector< std::uint8_t > retdec::fileformat::Relocation::getMask ( ) const

Get relocation mask

Returns
Relocation mask as vector of mask bytes

◆ getName()

std::string retdec::fileformat::Relocation::getName ( ) const

Get name of relocation

Returns
Relocation name

◆ getSectionOffset()

unsigned long long retdec::fileformat::Relocation::getSectionOffset ( ) const

Get offset of relocation in section at which relocation is applied

Returns
Offset of relocation

◆ getType()

unsigned long long retdec::fileformat::Relocation::getType ( ) const

Get type of relocation

Returns
Type of relocation

◆ hasEmptyName()

bool retdec::fileformat::Relocation::hasEmptyName ( ) const
Returns
true if relocation has empty name, false otherwise

◆ invalidateLinkToSection()

void retdec::fileformat::Relocation::invalidateLinkToSection ( )

Invalidate link to section

Instance method getLinkToSection() returns false after invocation of this method. Link to section is possible to revalidate by invocation of method setLinkToSection().

◆ invalidateLinkToSymbol()

void retdec::fileformat::Relocation::invalidateLinkToSymbol ( )

Invalidate link to symbol

Instance method getLinkToSymbol() returns false after invocation of this method. Link to symbol is possible to revalidate by invocation of method setLinkToSymbol().

◆ setAddend()

void retdec::fileformat::Relocation::setAddend ( unsigned long long  relocationAddend)

Set relocation addend

Parameters
relocationAddendAddend of the relocation

◆ setAddress()

void retdec::fileformat::Relocation::setAddress ( unsigned long long  relocationAddress)

Set address at which to apply the relocation

Parameters
relocationAddressAddress at which to apply the relocation

◆ setLinkToSection()

void retdec::fileformat::Relocation::setLinkToSection ( unsigned long long  relocationLinkToSection)

Set link to section at which relocation is applied

Parameters
relocationLinkToSectionLink to section at which relocation is applied

◆ setLinkToSymbol()

void retdec::fileformat::Relocation::setLinkToSymbol ( unsigned long long  relocationLinkToSymbol)

Set link to symbol which is used for relocation calculation

Parameters
relocationLinkToSymbolLink to symbol

◆ setMask()

void retdec::fileformat::Relocation::setMask ( const std::vector< std::uint8_t > &  relocationMask)

Set relocation mask

Parameters
relocationMaskRelocation mask as vector of mask bytes

◆ setName()

void retdec::fileformat::Relocation::setName ( std::string  relocationName)

Set relocation name

Parameters
relocationNameName of relocation

◆ setSectionOffset()

void retdec::fileformat::Relocation::setSectionOffset ( unsigned long long  relocationOffsetInSection)

Set offset in section at which relocation is applied

Parameters
relocationOffsetInSectionOffset in section at which relocation is applied

◆ setType()

void retdec::fileformat::Relocation::setType ( unsigned long long  relocationType)

Set type of relocation

Parameters
relocationTypeType of relocation

Member Data Documentation

◆ addend

unsigned long long retdec::fileformat::Relocation::addend = 0
private

addend of relocation

◆ address

unsigned long long retdec::fileformat::Relocation::address = 0
private

address at which to apply the relocation

◆ linkToSection

unsigned long long retdec::fileformat::Relocation::linkToSection = 0
private

link to section at which relocation is applied

◆ linkToSectionIsValid

bool retdec::fileformat::Relocation::linkToSectionIsValid = false
private

true if link to section is valid

◆ linkToSymbol

unsigned long long retdec::fileformat::Relocation::linkToSymbol = 0
private

link to symbol which is used for calculating relocations

◆ linkToSymbolIsValid

bool retdec::fileformat::Relocation::linkToSymbolIsValid = false
private

true if link to symbol is valid

◆ mask

std::vector<std::uint8_t> retdec::fileformat::Relocation::mask
private

relocation mask

◆ name

std::string retdec::fileformat::Relocation::name
private

relocation name

◆ offsetInSection

unsigned long long retdec::fileformat::Relocation::offsetInSection = 0
private

offset of relocation in section at which to apply the relocation

◆ type

unsigned long long retdec::fileformat::Relocation::type = 0
private

type of relocation


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