|
OpenASIP 2.2
|
#include <TPEFRelocSectionReader.hh>


Protected Member Functions | |
| TPEFRelocSectionReader () | |
| virtual | ~TPEFRelocSectionReader () |
| virtual void | finalize (Section *section) const |
| virtual void | readData (BinaryStream &stream, Section *section) const |
| virtual Section::SectionType | type () const |
| void | readInfo (BinaryStream &stream, Section *sect) const |
Protected Member Functions inherited from TPEF::TPEFSectionReader | |
| TPEFSectionReader () | |
| virtual BinaryReader * | parent () const |
Protected Member Functions inherited from TPEF::SectionReader | |
| SectionReader () | |
Private Member Functions | |
| TPEFRelocSectionReader (const TPEFRelocSectionReader &) | |
| Copying not allowed. | |
| TPEFRelocSectionReader & | operator= (TPEFRelocSectionReader &) |
| Assignment not allowed. | |
Static Private Attributes | |
| static TPEFRelocSectionReader | proto_ |
| Prototype instance of TPEFRelocSectionReader to be registered to SectionReader. | |
| static SectionId | refSectionId_ = 0 |
| Section id of last referenced section. | |
Additional Inherited Members | |
Public Types inherited from TPEF::SectionReader | |
| typedef BinaryReader::Length | Length |
Public Member Functions inherited from TPEF::TPEFSectionReader | |
| virtual | ~TPEFSectionReader () |
Public Member Functions inherited from TPEF::SectionReader | |
| virtual | ~SectionReader () |
Static Public Member Functions inherited from TPEF::SectionReader | |
| static void | readSection (BinaryStream &stream, Section *section, BinaryReader *reader) |
| static void | finalizeBinary (Binary *binaryToFinalize, BinaryReader *reader) |
Static Protected Member Functions inherited from TPEF::TPEFSectionReader | |
| static const Header & | header () |
Static Protected Member Functions inherited from TPEF::SectionReader | |
| static const SectionReader * | findSectionReader (const Section::SectionType type, const BinaryReader *bReader) |
| static void | registerSectionReader (const SectionReader *sReader) |
Reads relocation section from TPEF binary file.
Definition at line 47 of file TPEFRelocSectionReader.hh.
|
protected |
Constructor.
Registers itself to SectionReader.
Definition at line 77 of file TPEFRelocSectionReader.cc.
References TPEF::SectionReader::registerSectionReader().

|
protectedvirtual |
|
private |
Copying not allowed.
|
protectedvirtual |
Finalizer method for TPEF relocation sections.
Resolves destination fields of relocation elements.
| section | Section to finalize. |
Reimplemented from TPEF::SectionReader.
Definition at line 182 of file TPEFRelocSectionReader.cc.
References __func__, TPEF::Locator::absoluteAddress(), TPEF::RelocElement::aSpace(), TPEF::Section::aSpace(), TPEF::TPEFReader::aSpaceSection(), assert, BYTE_BITWIDTH, TPEF::RawSection::chunkToMAUIndex(), TPEF::Section::element(), TPEF::Section::elementCount(), TPEF::Section::isCodeSection(), TPEF::ASpaceSection::isUndefined(), TPEF::ImmediateElement::length(), TPEF::RelocElement::location(), TPEF::ASpaceElement::MAU(), TPEF::DataSection::MAU(), TPEF::TPEFSectionReader::parent(), MathTools::requiredBits(), TPEF::ReferenceManager::SectionKey::sectionId(), TPEF::ReferenceManager::SafePointer::sectionKeyFor(), TPEF::TPEFReader::sectionOfAddress(), TPEF::RelocElement::setDestination(), TPEF::RelocElement::size(), TPEF::Section::ST_DATA, TPEF::Section::ST_LEDATA, TPEF::Section::startingAddress(), TPEF::RelocElement::type(), TPEF::Section::type(), and TPEF::ImmediateElement::word().

|
private |
Assignment not allowed.
|
protectedvirtual |
Reads section data from TPEF binary file.
| stream | Stream to be read from. |
| section | Section where the information is to be stored. |
| UnreachableStream | If reading of section fails. |
| KeyAlreadyExists | Key was in use when trying to register object. |
| EndOfFile | If end of file were reached while it shouldn't. |
| OutOfRange | Some of read values were out of range. |
| WrongSubclass | Some class couldn't do what it was asked for. |
| UnexpectedValue | Ift here was unexpected value when reading. |
Reimplemented from TPEF::TPEFSectionReader.
Definition at line 110 of file TPEFRelocSectionReader.cc.
References TPEF::Section::addElement(), TPEF::ReferenceManager::SafePointer::addObjectReference(), assert, TPEF::TPEFSectionReader::Header::bodyOffset, TPEF::TPEFSectionReader::Header::elementSize, TPEF::TPEFSectionReader::header(), TPEF::Section::noBits(), TPEF::TPEFSectionReader::parent(), TPEF::BinaryStream::readByte(), TPEF::TPEFSectionReader::readData(), TPEF::BinaryStream::readWord(), refSectionId_, TPEF::RelocElement::setASpace(), TPEF::RelocElement::setBitOffset(), TPEF::RelocElement::setChunked(), TPEF::RelocElement::setLocation(), TPEF::BinaryStream::setReadPosition(), TPEF::RelocElement::setSize(), TPEF::RelocElement::setSymbol(), TPEF::RelocElement::setType(), TPEF::TPEFHeaders::STF_CHUNK, and TPEF::TPEFHeaders::STF_RELOCATION_TYPE_MASK.

|
protectedvirtual |
Reads info field of section header.
Read position of stream will be moved 4 bytes forward.
| stream | Stream where from info word is read. |
| section | Reloc section whose info field is read. |
Reimplemented from TPEF::TPEFSectionReader.
Definition at line 343 of file TPEFRelocSectionReader.cc.
References assert, TPEF::BinaryStream::readHalfWord(), and refSectionId_.

|
protectedvirtual |
Returns the type of section which the reader can read.
Implements TPEF::SectionReader.
Definition at line 93 of file TPEFRelocSectionReader.cc.
References TPEF::Section::ST_RELOC.
|
staticprivate |
Prototype instance of TPEFRelocSectionReader to be registered to SectionReader.
Definition at line 68 of file TPEFRelocSectionReader.hh.
|
staticprivate |
Section id of last referenced section.
Definition at line 71 of file TPEFRelocSectionReader.hh.
Referenced by readData(), and readInfo().