OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
TPEF::RelocSection Class Reference

#include <RelocSection.hh>

Inheritance diagram for TPEF::RelocSection:
Inheritance graph
Collaboration diagram for TPEF::RelocSection:
Collaboration graph

Public Member Functions

virtual ~RelocSection ()
 
virtual SectionType type () const
 
SectionreferencedSection () const
 
void setReferencedSection (Section *section)
 
void setReferencedSection (const ReferenceManager::SafePointer *section)
 
- Public Member Functions inherited from TPEF::Section
virtual ~Section ()
 
virtual bool isChunkable () const
 
virtual Chunkchunk (SectionOffset offset) const
 
bool isProgramSection () const
 
bool isAuxSection () const
 
virtual void addElement (SectionElement *element)
 
virtual void setElement (Word index, SectionElement *element)
 
SectionElementelement (Word index) const
 
Word elementCount () const
 
void setFlagNoBits ()
 
void unsetFlagNoBits ()
 
bool noBits () const
 
bool vLen () const
 
Byte flags () const
 
void setFlags (Byte flagByte)
 
void setStartingAddress (AddressImage address)
 
AddressImage startingAddress () const
 
void setLink (const ReferenceManager::SafePointer *aLink)
 
void setLink (Section *aLink)
 
Sectionlink () const
 
void setASpace (const ReferenceManager::SafePointer *addrSpace)
 
void setASpace (ASpaceElement *addrSpace)
 
ASpaceElementaSpace () const
 
void setName (const ReferenceManager::SafePointer *sectionName)
 
void setName (Chunk *sectionName)
 
Chunkname () const
 
virtual bool isDataSection () const
 
virtual bool isCodeSection () const
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Protected Member Functions

 RelocSection (bool init)
 
virtual Sectionclone () const
 
- Protected Member Functions inherited from TPEF::Section
 Section ()
 
void setFlagVLen ()
 
void unsetFlagVLen ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Private Attributes

const ReferenceManager::SafePointerrefSection_
 Section whose elements are being relocated by relocations of this section. More...
 

Static Private Attributes

static RelocSection proto_
 Prototype instance of section. More...
 

Additional Inherited Members

- Public Types inherited from TPEF::Section
enum  SectionType {
  ST_NULL = 0x00, ST_STRTAB = 0x01, ST_SYMTAB = 0x02, ST_DEBUG = 0x03,
  ST_RELOC = 0x04, ST_LINENO = 0x05, ST_NOTE = 0x06, ST_ADDRSP = 0x07,
  ST_MR = 0x0A, ST_CODE = 0x81, ST_DATA = 0x82, ST_UDATA = 0x83,
  ST_LEDATA = 0x84, ST_DUMMY = 0xff
}
 
enum  SectionFlag { SF_VLEN = 0x40, SF_NOBITS = 0x80 }
 
- Static Public Member Functions inherited from TPEF::Section
static SectioncreateSection (SectionType type)
 
static bool isProgramSection (SectionType type)
 
- Static Protected Member Functions inherited from TPEF::Section
static void registerSection (const Section *section)
 

Detailed Description

Relocation table section.

Definition at line 47 of file RelocSection.hh.

Constructor & Destructor Documentation

◆ ~RelocSection()

TPEF::RelocSection::~RelocSection ( )
virtual

Destructor.

Definition at line 64 of file RelocSection.cc.

64  {
65 }

◆ RelocSection()

TPEF::RelocSection::RelocSection ( bool  init)
protected

Constructor.

Parameters
initTrue if registeration is wanted.

Definition at line 49 of file RelocSection.cc.

49  :
51 
52  if (init) {
54  }
55 
56  unsetFlagVLen();
59 }

References TPEF::Section::registerSection(), TPEF::Section::setStartingAddress(), TPEF::Section::unsetFlagNoBits(), and TPEF::Section::unsetFlagVLen().

Referenced by clone().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

Section * TPEF::RelocSection::clone ( ) const
protectedvirtual

Creates an instance of class.

Returns
Newly created section.

Implements TPEF::Section.

Definition at line 83 of file RelocSection.cc.

83  {
84  return new RelocSection(false);
85 }

References RelocSection().

Here is the call graph for this function:

◆ referencedSection()

Section* TPEF::RelocSection::referencedSection ( ) const

◆ setReferencedSection() [1/2]

void TPEF::RelocSection::setReferencedSection ( const ReferenceManager::SafePointer section)

◆ setReferencedSection() [2/2]

void TPEF::RelocSection::setReferencedSection ( Section section)

◆ type()

Section::SectionType TPEF::RelocSection::type ( ) const
virtual

Returns section's type.

Returns
Type of section.

Implements TPEF::Section.

Definition at line 73 of file RelocSection.cc.

73  {
74  return ST_RELOC;
75 }

References TPEF::Section::ST_RELOC.

Member Data Documentation

◆ proto_

RelocSection TPEF::RelocSection::proto_
staticprivate

Prototype instance of section.

Definition at line 64 of file RelocSection.hh.

◆ refSection_

const ReferenceManager::SafePointer* TPEF::RelocSection::refSection_
private

Section whose elements are being relocated by relocations of this section.

Definition at line 67 of file RelocSection.hh.


The documentation for this class was generated from the following files:
TPEF::Section::unsetFlagVLen
void unsetFlagVLen()
TPEF::ReferenceManager::SafePointer::null
static const SafePointer null
The default SafePointer that is used in null references.
Definition: SafePointer.hh:229
TPEF::RelocSection::RelocSection
RelocSection(bool init)
Definition: RelocSection.cc:49
TPEF::Section::Section
Section()
Definition: Section.cc:64
TPEF::Section::unsetFlagNoBits
void unsetFlagNoBits()
TPEF::Section::setStartingAddress
void setStartingAddress(AddressImage address)
TPEF::Section::registerSection
static void registerSection(const Section *section)
Definition: Section.cc:114
TPEF::RelocSection::refSection_
const ReferenceManager::SafePointer * refSection_
Section whose elements are being relocated by relocations of this section.
Definition: RelocSection.hh:67
TPEF::Section::ST_RELOC
@ ST_RELOC
Relocation section.
Definition: Section.hh:74