OpenASIP  2.0
Static Public Member Functions | List of all members
TPEF::Locator Class Reference

#include <Locator.hh>

Collaboration diagram for TPEF::Locator:
Collaboration graph

Static Public Member Functions

static AddressImage absoluteAddress (AddressImage relocationValue, RelocElement::RelocType relocType)
 

Detailed Description

Class who knows how to convert addresses depending on relocation type.

There should be possibility to register new relocation types, like section readers and binary readers are implemented.

Definition at line 51 of file Locator.hh.

Member Function Documentation

◆ absoluteAddress()

AddressImage TPEF::Locator::absoluteAddress ( AddressImage  relocationValue,
RelocElement::RelocType  relocType 
)
static

Hard coded to return absolute address of relocation.

Parameters
relocationValueValue to be converted to an absolute address.
relocTypeType of relocation.
Returns
Absolute address of relocated value.

Definition at line 46 of file Locator.cc.

48  {
49 
50  if (relocType != RelocElement::RT_SELF) {
51  bool unsupportedRelocationType = false;
52  assert(unsupportedRelocationType);
53  }
54 
55  return relocationValue;
56 }

References assert, and TPEF::RelocElement::RT_SELF.

Referenced by TPEF::TPEFRelocSectionReader::finalize().


The documentation for this class was generated from the following files:
assert
#define assert(condition)
Definition: Application.hh:86
TPEF::RelocElement::RT_SELF
@ RT_SELF
Absolute address, relocate relative to address self.
Definition: RelocElement.hh:58