53using ReferenceManager::SafePointer;
54using ReferenceManager::SectionIndexKey;
55using ReferenceManager::SectionOffsetKey;
56using ReferenceManager::SectionKey;
110 assert(symbolSection != NULL);
114 bool undefSymbolDefined =
false;
123 while (elementStart +
header().elementSize <=
128 Word nameOffset = stream.
readWord();
145 elem =
createSymbol(typeOfSym, value, size, sectionToBelong);
151 elem->
setName(CREATE_SAFEPOINTER(sOffKey));
167 undefSymbolDefined =
true;
180 if (!undefSymbolDefined) {
185 elem->
setName(CREATE_SAFEPOINTER(sOffKey));
227 if (sectToBelong != 0) {
230 (elem)->setReference(CREATE_SAFEPOINTER(sOffKey));
232 (elem)->setSize(aSize);
240 if (sectToBelong != 0) {
243 (elem)->setReference(CREATE_SAFEPOINTER(sOffKey));
246 (elem)->setSize(aSize);
#define assert(condition)
void setReadPosition(unsigned int position)
static void addObjectReference(SectionIndexKey key, const SafePointable *obj)
static void registerSectionReader(const SectionReader *sReader)
virtual void addElement(SectionElement *element)
SymbolType
Type of symbol element.
@ STT_PROCEDURE
Symbol gives indicates procedure start position in section.
@ STT_FILE
Name of symbol gives the name of source file associated with this object file.
@ STT_CODE
Associated with executable code.
@ STT_NOTYPE
Type is not defined.
@ STT_SECTION
Associated with section.
@ STT_DATA
Associated with data object.
virtual SymbolType type() const =0
Returns type of symbol.
void setAbsolute(bool anAbsoluteness)
void setName(Chunk *aName)
void setBinding(SymbolBinding aBinding)
SymbolBinding binding() const
void setSection(Section *aSect)
SymbolBinding
Binding types of symbol.
@ STB_LOCAL
Not visible outside the object file that contains it's definition.
virtual void readData(BinaryStream &stream, Section *section) const
static const Header & header()
TPEFSymbolSectionReader()
SymbolElement * createSymbol(SymbolElement::SymbolType symType, Word aValue, Word aSize, SectionId sectToBelong) const
virtual Section::SectionType type() const
virtual ~TPEFSymbolSectionReader()
virtual void readData(BinaryStream &stream, Section *section) const
static TPEFSymbolSectionReader proto_
Prototype instance of TPEFSymbolSectionReader to be registered to SectionReader.
static const Byte SYMBOL_TYPE_MASK
Mask for getting type of symbol from st_info field of symbol element.
HalfWord SectionId
Type for storing binary file section ids.
SymbolElement::SymbolType SymbolType
Word SectionIndex
Type for storing section indexes.
Word SectionOffset
Type for storing offsets relative to a given base offset value.
SymbolElement::SymbolBinding SymbolBinding