OpenASIP  2.0
Public Types | Public Member Functions | Private Attributes | List of all members
TPEF::RelocElement Class Reference

#include <RelocElement.hh>

Inheritance diagram for TPEF::RelocElement:
Inheritance graph
Collaboration diagram for TPEF::RelocElement:
Collaboration graph

Public Types

enum  RelocType { RT_NOREL = 0x00, RT_SELF = 0x01, RT_PAGE = 0x02, RT_PCREL = 0x03 }
 

Public Member Functions

 RelocElement ()
 
virtual ~RelocElement ()
 
RelocType type () const
 
void setType (RelocType aType)
 
SectionElementlocation () const
 
void setLocation (SectionElement *aLocation)
 
void setLocation (const ReferenceManager::SafePointer *aLocation)
 
SectionElementdestination () const
 
void setDestination (SectionElement *aDestination)
 
void setDestination (const ReferenceManager::SafePointer *aDestination)
 
Byte size () const
 
void setSize (Byte aSize)
 
Byte bitOffset () const
 
void setBitOffset (Byte anOffset)
 
SymbolElementsymbol () const
 
void setSymbol (SymbolElement *aSymbol)
 
void setSymbol (const ReferenceManager::SafePointer *aSymbol)
 
ASpaceElementaSpace () const
 
void setASpace (ASpaceElement *anASpace)
 
void setASpace (const ReferenceManager::SafePointer *anASpace)
 
bool chunked () const
 
void setChunked (bool isChunked)
 
- Public Member Functions inherited from TPEF::SectionElement
virtual ~SectionElement ()
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Private Attributes

RelocType type_
 The type of the relocation. More...
 
const ReferenceManager::SafePointerlocation_
 The element containing location to be relocated. More...
 
const ReferenceManager::SafePointerdestination_
 The destination element of the location to be relocated. More...
 
Byte size_
 Bit width of value(or chunk of value) to be relocated. More...
 
Byte bitOffset_
 Bit offset where in whole value bits of this chunk should be. More...
 
const ReferenceManager::SafePointersymbol_
 The symbol of relocation. More...
 
const ReferenceManager::SafePointeraSpace_
 The address space of relocated element. More...
 
bool chunked_
 Does relocation refer to chunked address. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TPEF::SectionElement
 SectionElement ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Detailed Description

Relocation table entry.

Definition at line 51 of file RelocElement.hh.

Member Enumeration Documentation

◆ RelocType

TPEF relocation types.

Enumerator
RT_NOREL 

No relocation.

RT_SELF 

Absolute address, relocate relative to address self.

RT_PAGE 

Paged address, relocate page offset.

RT_PCREL 

PC-relative, relocate only if displacement changes.

Definition at line 56 of file RelocElement.hh.

56  {
57  RT_NOREL = 0x00, ///< No relocation
58  RT_SELF = 0x01, ///< Absolute address, relocate relative to
59  ///< address self.
60  RT_PAGE = 0x02, ///< Paged address, relocate page offset.
61  RT_PCREL = 0x03 ///< PC-relative, relocate only if
62  ///< displacement changes.
63  };

Constructor & Destructor Documentation

◆ RelocElement()

TPEF::RelocElement::RelocElement ( )

Constructor.

Definition at line 46 of file RelocElement.cc.

◆ ~RelocElement()

TPEF::RelocElement::~RelocElement ( )
virtual

Destructor.

Definition at line 56 of file RelocElement.cc.

56  {
57 }

Member Function Documentation

◆ aSpace()

ASpaceElement* TPEF::RelocElement::aSpace ( ) const

◆ bitOffset()

Byte TPEF::RelocElement::bitOffset ( ) const

◆ chunked()

bool TPEF::RelocElement::chunked ( ) const

◆ destination()

SectionElement* TPEF::RelocElement::destination ( ) const

◆ location()

SectionElement* TPEF::RelocElement::location ( ) const

◆ setASpace() [1/2]

void TPEF::RelocElement::setASpace ( ASpaceElement anASpace)

◆ setASpace() [2/2]

void TPEF::RelocElement::setASpace ( const ReferenceManager::SafePointer anASpace)

◆ setBitOffset()

void TPEF::RelocElement::setBitOffset ( Byte  anOffset)

◆ setChunked()

void TPEF::RelocElement::setChunked ( bool  isChunked)

◆ setDestination() [1/2]

void TPEF::RelocElement::setDestination ( const ReferenceManager::SafePointer aDestination)

◆ setDestination() [2/2]

void TPEF::RelocElement::setDestination ( SectionElement aDestination)

◆ setLocation() [1/2]

void TPEF::RelocElement::setLocation ( const ReferenceManager::SafePointer aLocation)

◆ setLocation() [2/2]

void TPEF::RelocElement::setLocation ( SectionElement aLocation)

◆ setSize()

void TPEF::RelocElement::setSize ( Byte  aSize)

◆ setSymbol() [1/2]

void TPEF::RelocElement::setSymbol ( const ReferenceManager::SafePointer aSymbol)

◆ setSymbol() [2/2]

void TPEF::RelocElement::setSymbol ( SymbolElement aSymbol)

◆ setType()

void TPEF::RelocElement::setType ( RelocType  aType)

◆ size()

Byte TPEF::RelocElement::size ( ) const

◆ symbol()

SymbolElement* TPEF::RelocElement::symbol ( ) const

◆ type()

RelocType TPEF::RelocElement::type ( ) const

Member Data Documentation

◆ aSpace_

const ReferenceManager::SafePointer* TPEF::RelocElement::aSpace_
private

The address space of relocated element.

Definition at line 110 of file RelocElement.hh.

◆ bitOffset_

Byte TPEF::RelocElement::bitOffset_
private

Bit offset where in whole value bits of this chunk should be.

Definition at line 106 of file RelocElement.hh.

◆ chunked_

bool TPEF::RelocElement::chunked_
private

Does relocation refer to chunked address.

Definition at line 112 of file RelocElement.hh.

◆ destination_

const ReferenceManager::SafePointer* TPEF::RelocElement::destination_
private

The destination element of the location to be relocated.

Definition at line 102 of file RelocElement.hh.

◆ location_

const ReferenceManager::SafePointer* TPEF::RelocElement::location_
private

The element containing location to be relocated.

Definition at line 100 of file RelocElement.hh.

◆ size_

Byte TPEF::RelocElement::size_
private

Bit width of value(or chunk of value) to be relocated.

Definition at line 104 of file RelocElement.hh.

◆ symbol_

const ReferenceManager::SafePointer* TPEF::RelocElement::symbol_
private

The symbol of relocation.

Definition at line 108 of file RelocElement.hh.

◆ type_

RelocType TPEF::RelocElement::type_
private

The type of the relocation.

Definition at line 98 of file RelocElement.hh.


The documentation for this class was generated from the following files:
TPEF::RelocElement::size_
Byte size_
Bit width of value(or chunk of value) to be relocated.
Definition: RelocElement.hh:104
TPEF::RelocElement::RT_PCREL
@ RT_PCREL
PC-relative, relocate only if displacement changes.
Definition: RelocElement.hh:61
TPEF::RelocElement::type_
RelocType type_
The type of the relocation.
Definition: RelocElement.hh:98
TPEF::SectionElement::SectionElement
SectionElement()
Definition: SectionElement.cc:41
TPEF::ReferenceManager::SafePointer::null
static const SafePointer null
The default SafePointer that is used in null references.
Definition: SafePointer.hh:229
TPEF::RelocElement::bitOffset_
Byte bitOffset_
Bit offset where in whole value bits of this chunk should be.
Definition: RelocElement.hh:106
TPEF::RelocElement::destination_
const ReferenceManager::SafePointer * destination_
The destination element of the location to be relocated.
Definition: RelocElement.hh:102
TPEF::RelocElement::RT_SELF
@ RT_SELF
Absolute address, relocate relative to address self.
Definition: RelocElement.hh:58
TPEF::RelocElement::chunked_
bool chunked_
Does relocation refer to chunked address.
Definition: RelocElement.hh:112
TPEF::RelocElement::symbol_
const ReferenceManager::SafePointer * symbol_
The symbol of relocation.
Definition: RelocElement.hh:108
TPEF::RelocElement::location_
const ReferenceManager::SafePointer * location_
The element containing location to be relocated.
Definition: RelocElement.hh:100
TPEF::RelocElement::RT_NOREL
@ RT_NOREL
No relocation.
Definition: RelocElement.hh:57
TPEF::RelocElement::RT_PAGE
@ RT_PAGE
Paged address, relocate page offset.
Definition: RelocElement.hh:60
TPEF::RelocElement::aSpace_
const ReferenceManager::SafePointer * aSpace_
The address space of relocated element.
Definition: RelocElement.hh:110