Go to the documentation of this file.
60 using ReferenceManager::SectionKey;
61 using ReferenceManager::SectionOffsetKey;
62 using ReferenceManager::SectionIndexKey;
63 using ReferenceManager::SafePointer;
127 undefSymbol->
setName(CREATE_SAFEPOINTER(nullStringKey));
184 resource->
setId(value);
198 resource->
setId(value);
215 resource->
setName(CREATE_SAFEPOINTER(nullStringKey));
222 resource->
setName(CREATE_SAFEPOINTER(nullStringKey));
229 resource->
setName(CREATE_SAFEPOINTER(nullStringKey));
236 resource->
setName(CREATE_SAFEPOINTER(nullStringKey));
243 resource->
setName(CREATE_SAFEPOINTER(nullStringKey));
305 std::string symbolName =
309 Word tpefAddress = value/8;
323 element->
setSection(CREATE_SAFEPOINTER(sKey));
347 element->
setSection(CREATE_SAFEPOINTER(sKey));
358 std::string symbolName =
367 if (value != resolvedValue) {
378 std::string symbolName =
382 Word numberOfInstruction = value / 8;
383 annotationes_.push_back(std::pair<Word, std::string>(numberOfInstruction, symbolName));
414 element->
setName(CREATE_SAFEPOINTER(strOffKey));
478 if (codeSym != NULL) {
544 for (
unsigned int j = module.
startAddress_; j < lastAddress; j++) {
555 textSection->
element(sectionIndex + 1));
592 if (annString.at(10) !=
':') {
595 "11 first characters of annotation stab must contain "
596 "annotation ID ending with ':' e.g. '0x00011000:'");
601 std::string payString = annString.substr(11,annString.length() - 10);
602 std::vector<Byte> payload;
604 for (
unsigned int j = 0; j < payString.length(); j++) {
605 payload.push_back(payString.at(j));
virtual InstructionElement * element(Word index) const
@ MRT_OP
Operation operand or function unit register.
static const Word DATA_SYMBOL_SIZE
Data symbol size in bytes.
SymbolElement * initializeSymbol(BinaryStream &stream, SectionOffset sectionOffset, AOutReader *reader) const
void setReference(Chunk *aReference)
unsigned int readPosition()
void addAnnotation(InstructionAnnotation *anAnnotation)
@ N_EXT
Mask bit for external.
@ N_PRTAB
TCE processors resource entry.
NullSection * nullSection() const
@ BOOL_RF
Universal boolean register file.
virtual void setElement(Word index, SectionElement *element)
@ MRT_SR
Special register.
static const std::string GCC_MODULE_START_SYMBOL2
One of the symbols that are used to indicate start of new compilation module in a....
std::map< std::string, Word > resolvedResources_
Resource id:s for strings.
std::string chunk2String(const Chunk *chunk) const
virtual void readData(BinaryStream &stream, Section *section) const
HalfWord sourceIndex() const
void setBinding(SymbolBinding aBinding)
static void addObjectReference(SectionIndexKey key, const SafePointable *obj)
void setType(ResourceType aType)
void setReference(InstructionElement *aReference)
Section * section() const
SectionElement * element(Word index) const
#define assert(condition)
DebugSection * debugSection() const
virtual void addElement(SectionElement *element)
AOutSymbolSectionReader()
virtual SymbolType type() const =0
Returns type of symbol.
@ N_ANN
TCE annotation entry.
HalfWord sourceUnit() const
static AOutSymbolSectionReader proto_
Class-wide (unique) prototype instance of AOutSymbolSectionReader registered into SectionReader.
virtual BinaryReader * parent() const
std::map< Word, SectionOffset > resources_
Resources id replacements for the compilation module.
@ STB_GLOBAL
Visible to all files that are combined in TPEF file.
std::vector< std::pair< Word, std::string > > annotationes_
Chunk * string2Chunk(const std::string &str)
void setSection(Section *aSect)
virtual void finalize(Section *section) const
Word FileOffset
Type for storing absolute file offsets.
InstructionElement & instruction(Word index) const
std::vector< CompilationModule > addedResources_
List of compilation modules of a.out.
HalfWord destinationIndex() const
static void registerSectionReader(const SectionReader *sReader)
void setDestinationIndex(HalfWord aDestinationIndex)
void setName(Chunk *aName)
FieldType destinationType() const
InstructionElement * reference() const
@ STT_CODE
Associated with executable code.
HalfWord destinationUnit() const
Word SectionOffset
Type for storing offsets relative to a given base offset value.
static const Header & header()
SectionOffset offset() const
Word instructionCount() const
static const std::string GCC_MODULE_START_SYMBOL1
One of the symbols that are used to indicate start of new compilation module in a....
static const Word FIRST_FU_REGISTER
Index of the first function unit register.
SectionOffset sectionOffsetOfAddress(AddressImage address) const
virtual ~AOutSymbolSectionReader()
Word startAddress_
Start address of linked compilation module in a.out.
void setSourceIndex(HalfWord aSourceIndex)
Word instructionToSectionIndex(Word index) const
void setAbsolute(bool anAbsoluteness)
@ STT_NOTYPE
Type is not defined.
FieldType sourceType() const
static int toInt(const T &source)
@ UNIVERSAL_BUS
Universal bus.
@ FP_RF
Universal floating point register file.
@ INT_RF
Universal integer register file.
static void replaceAllReferences(SafePointable *newObj, SafePointable *oldObj)
virtual Chunk * chunk(SectionOffset offset) const
void setName(ReferenceManager::SafePointer *aName)
@ STB_LOCAL
Not visible outside the object file that contains it's definition.
virtual Section::SectionType type() const
Word elementCount() const
void setDebugString(const ReferenceManager::SafePointer *aString)
@ UNIVERSAL_FU
Universal function unit.