60using ReferenceManager::SectionKey;
61using ReferenceManager::SectionOffsetKey;
62using ReferenceManager::SectionIndexKey;
63using 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));
#define assert(condition)
static int toInt(const T &source)
SectionOffset sectionOffsetOfAddress(AddressImage address) const
NullSection * nullSection() const
DebugSection * debugSection() const
@ N_ANN
TCE annotation entry.
@ N_PRTAB
TCE processors resource entry.
@ N_EXT
Mask bit for external.
static const Word FIRST_FU_REGISTER
Index of the first function unit register.
static const Header & header()
virtual BinaryReader * parent() 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....
virtual ~AOutSymbolSectionReader()
SymbolElement * initializeSymbol(BinaryStream &stream, SectionOffset sectionOffset, AOutReader *reader) const
static AOutSymbolSectionReader proto_
Class-wide (unique) prototype instance of AOutSymbolSectionReader registered into SectionReader.
virtual void finalize(Section *section) const
static const Word DATA_SYMBOL_SIZE
Data symbol size in bytes.
std::vector< CompilationModule > addedResources_
List of compilation modules of a.out.
std::vector< std::pair< Word, std::string > > annotationes_
virtual Section::SectionType type() const
std::map< std::string, Word > resolvedResources_
Resource id:s for strings.
static const std::string GCC_MODULE_START_SYMBOL2
One of the symbols that are used to indicate start of new compilation module in a....
AOutSymbolSectionReader()
virtual void readData(BinaryStream &stream, Section *section) const
unsigned int readPosition()
SectionOffset offset() const
virtual InstructionElement * element(Word index) const
InstructionElement & instruction(Word index) const
Word instructionToSectionIndex(Word index) const
Word instructionCount() const
InstructionElement * reference() const
void setReference(InstructionElement *aReference)
void setReference(Chunk *aReference)
void setDebugString(const ReferenceManager::SafePointer *aString)
void addAnnotation(InstructionAnnotation *anAnnotation)
FieldType destinationType() const
HalfWord destinationIndex() const
HalfWord destinationUnit() const
void setSourceIndex(HalfWord aSourceIndex)
HalfWord sourceUnit() const
HalfWord sourceIndex() const
void setDestinationIndex(HalfWord aDestinationIndex)
FieldType sourceType() const
virtual Chunk * chunk(SectionOffset offset) const
static void addObjectReference(SectionIndexKey key, const SafePointable *obj)
static void replaceAllReferences(SafePointable *newObj, SafePointable *oldObj)
void setName(ReferenceManager::SafePointer *aName)
@ MRT_SR
Special register.
@ MRT_OP
Operation operand or function unit register.
@ UNIVERSAL_BUS
Universal bus.
@ UNIVERSAL_FU
Universal function unit.
@ INT_RF
Universal integer register file.
@ BOOL_RF
Universal boolean register file.
@ FP_RF
Universal floating point register file.
void setType(ResourceType aType)
static void registerSectionReader(const SectionReader *sReader)
virtual void setElement(Word index, SectionElement *element)
virtual void addElement(SectionElement *element)
SectionElement * element(Word index) const
Word elementCount() const
std::string chunk2String(const Chunk *chunk) const
Chunk * string2Chunk(const std::string &str)
@ STT_CODE
Associated with executable code.
@ STT_NOTYPE
Type is not defined.
virtual SymbolType type() const =0
Returns type of symbol.
void setAbsolute(bool anAbsoluteness)
void setName(Chunk *aName)
void setBinding(SymbolBinding aBinding)
Section * section() const
void setSection(Section *aSect)
@ 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.
Word SectionOffset
Type for storing offsets relative to a given base offset value.
Word FileOffset
Type for storing absolute file offsets.