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

#include <SymbolElement.hh>

Inheritance diagram for TPEF::SymbolElement:
Inheritance graph
Collaboration diagram for TPEF::SymbolElement:
Collaboration graph

Public Types

enum  SymbolBinding { STB_LOCAL = 0x0, STB_GLOBAL = 0x1, STB_WEAK = 0x2 }
 Binding types of symbol. More...
 
enum  SymbolType {
  STT_NOTYPE = 0x0, STT_DATA = 0x1, STT_CODE = 0x2, STT_SECTION = 0x3,
  STT_FILE = 0x4, STT_PROCEDURE = 0x5
}
 Type of symbol element. More...
 

Public Member Functions

 SymbolElement ()
 
virtual ~SymbolElement ()
 
virtual SymbolType type () const =0
 Returns type of symbol. More...
 
bool absolute () const
 
void setAbsolute (bool anAbsoluteness)
 
SymbolBinding binding () const
 
void setBinding (SymbolBinding aBinding)
 
Chunkname () const
 
void setName (Chunk *aName)
 
void setName (const ReferenceManager::SafePointer *aName)
 
Sectionsection () const
 
void setSection (Section *aSect)
 
void setSection (const ReferenceManager::SafePointer *aSect)
 
- Public Member Functions inherited from TPEF::SectionElement
virtual ~SectionElement ()
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Private Attributes

bool absolute_
 Is symbol absolutely or relocating. More...
 
SymbolBinding bind_
 Binding of the symbol. More...
 
const ReferenceManager::SafePointername_
 The name of the symbol. More...
 
const ReferenceManager::SafePointersection_
 Section to which the symbol belongs. More...
 

Additional Inherited Members

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

Detailed Description

Symbol table entry.

Definition at line 52 of file SymbolElement.hh.

Member Enumeration Documentation

◆ SymbolBinding

Binding types of symbol.

Enumerator
STB_LOCAL 

Not visible outside the object file that contains it's definition.

STB_GLOBAL 

Visible to all files that are combined in TPEF file.

STB_WEAK 

Visible to all object files that are combined in the TPEF file, but with linkage priority lower than STB_GLOBAL symbols.

Definition at line 55 of file SymbolElement.hh.

55  {
56  STB_LOCAL = 0x0, ///< Not visible outside the object file that
57  ///< contains it's definition.
58  STB_GLOBAL = 0x1, ///< Visible to all files that are combined
59  ///< in TPEF file.
60  STB_WEAK = 0x2 ///< Visible to all object files that are combined
61  ///< in the TPEF file, but with linkage priority
62  ///< lower than STB_GLOBAL symbols.
63  };

◆ SymbolType

Type of symbol element.

Enumerator
STT_NOTYPE 

Type is not defined.

STT_DATA 

Associated with data object.

STT_CODE 

Associated with executable code.

STT_SECTION 

Associated with section.

STT_FILE 

Name of symbol gives the name of source file associated with this object file.

STT_PROCEDURE 

Symbol gives indicates procedure start position in section.

Definition at line 66 of file SymbolElement.hh.

66  {
67  STT_NOTYPE = 0x0, ///< Type is not defined.
68  STT_DATA = 0x1, ///< Associated with data object.
69  STT_CODE = 0x2, ///< Associated with executable code.
70  STT_SECTION = 0x3,///< Associated with section.
71  STT_FILE = 0x4, ///< Name of symbol gives the name of source file
72  ///< associated with this object file.
73  STT_PROCEDURE = 0x5 ///< Symbol gives indicates procedure start
74  ///< position in section
75  };

Constructor & Destructor Documentation

◆ SymbolElement()

TPEF::SymbolElement::SymbolElement ( )

Constructor.

Definition at line 46 of file SymbolElement.cc.

46  :
48  absolute_(false),
52 }

◆ ~SymbolElement()

TPEF::SymbolElement::~SymbolElement ( )
virtual

Destructor.

Definition at line 57 of file SymbolElement.cc.

57  {
58 }

Member Function Documentation

◆ absolute()

bool TPEF::SymbolElement::absolute ( ) const

◆ binding()

SymbolBinding TPEF::SymbolElement::binding ( ) const

◆ name()

Chunk* TPEF::SymbolElement::name ( ) const

◆ section()

Section* TPEF::SymbolElement::section ( ) const

◆ setAbsolute()

void TPEF::SymbolElement::setAbsolute ( bool  anAbsoluteness)

◆ setBinding()

void TPEF::SymbolElement::setBinding ( SymbolBinding  aBinding)

◆ setName() [1/2]

void TPEF::SymbolElement::setName ( Chunk aName)

◆ setName() [2/2]

void TPEF::SymbolElement::setName ( const ReferenceManager::SafePointer aName)

◆ setSection() [1/2]

void TPEF::SymbolElement::setSection ( const ReferenceManager::SafePointer aSect)

◆ setSection() [2/2]

void TPEF::SymbolElement::setSection ( Section aSect)

◆ type()

virtual SymbolType TPEF::SymbolElement::type ( ) const
pure virtual

Member Data Documentation

◆ absolute_

bool TPEF::SymbolElement::absolute_
private

Is symbol absolutely or relocating.

Definition at line 99 of file SymbolElement.hh.

◆ bind_

SymbolBinding TPEF::SymbolElement::bind_
private

Binding of the symbol.

Definition at line 101 of file SymbolElement.hh.

◆ name_

const ReferenceManager::SafePointer* TPEF::SymbolElement::name_
private

The name of the symbol.

Definition at line 103 of file SymbolElement.hh.

◆ section_

const ReferenceManager::SafePointer* TPEF::SymbolElement::section_
private

Section to which the symbol belongs.

Definition at line 105 of file SymbolElement.hh.


The documentation for this class was generated from the following files:
TPEF::SymbolElement::STT_PROCEDURE
@ STT_PROCEDURE
Symbol gives indicates procedure start position in section.
Definition: SymbolElement.hh:73
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::SymbolElement::section_
const ReferenceManager::SafePointer * section_
Section to which the symbol belongs.
Definition: SymbolElement.hh:105
TPEF::SymbolElement::STT_FILE
@ STT_FILE
Name of symbol gives the name of source file associated with this object file.
Definition: SymbolElement.hh:71
TPEF::SymbolElement::STT_SECTION
@ STT_SECTION
Associated with section.
Definition: SymbolElement.hh:70
TPEF::SymbolElement::absolute_
bool absolute_
Is symbol absolutely or relocating.
Definition: SymbolElement.hh:99
TPEF::SymbolElement::STB_GLOBAL
@ STB_GLOBAL
Visible to all files that are combined in TPEF file.
Definition: SymbolElement.hh:58
TPEF::SymbolElement::bind_
SymbolBinding bind_
Binding of the symbol.
Definition: SymbolElement.hh:101
TPEF::SymbolElement::STT_CODE
@ STT_CODE
Associated with executable code.
Definition: SymbolElement.hh:69
TPEF::SymbolElement::STB_WEAK
@ STB_WEAK
Visible to all object files that are combined in the TPEF file, but with linkage priority lower than ...
Definition: SymbolElement.hh:60
TPEF::SymbolElement::name_
const ReferenceManager::SafePointer * name_
The name of the symbol.
Definition: SymbolElement.hh:103
TPEF::SymbolElement::STT_DATA
@ STT_DATA
Associated with data object.
Definition: SymbolElement.hh:68
TPEF::SymbolElement::STT_NOTYPE
@ STT_NOTYPE
Type is not defined.
Definition: SymbolElement.hh:67
TPEF::SymbolElement::STB_LOCAL
@ STB_LOCAL
Not visible outside the object file that contains it's definition.
Definition: SymbolElement.hh:56