RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
A block containing a sequence of relocations between two blocks, either the offset or segment parts. More...
#include <pcos.h>
Public Member Functions | |
RelocationBlock (int type) | |
uint16_t | GetLength () const override |
The length of the block, not including the type and length fields. | |
void | ReadFile (Linker::Reader &rd, uint16_t length) override |
Fills the contents of this object. | |
void | WriteFile (Linker::Writer &wr) const override |
Writes the contents of the block to the file, including the type and length fields. | |
void | AddFields (Dumper::Region ®ion, const CMDFormat &module) const override |
Adds block specific fields. | |
void | DumpContents (Dumper::Dumper &dump, offset_t file_offset, const CMDFormat &module) const override |
Display block specific contents. | |
![]() | |
virtual std::unique_ptr< Dumper::Region > | MakeRegion (std::string name, offset_t offset, unsigned display_width) const |
Creates a region for displaying the block contents. | |
void | Dump (Dumper::Dumper &dump, offset_t file_offset, const CMDFormat &module) const |
Displays the entire block. | |
MemoryBlock (int type) | |
Public Attributes | |
uint8_t | source = 0 |
The block where these relocations must be applied. | |
uint8_t | target = 0 |
The block referenced. | |
std::vector< uint16_t > | offsets |
Sequence of offsets to 16-bit words that must be relocated. | |
![]() | |
block_type | type |
The type of the block. | |
Additional Inherited Members | |
![]() | |
enum | block_type : uint8_t { TYPE_LOAD = 3 , TYPE_OFFSET_RELOCATION = 4 , TYPE_SEGMENT_RELOCATION = 5 , TYPE_END = 6 } |
Every block has a type field. More... | |
![]() | |
static std::unique_ptr< MemoryBlock > | ReadFile (Linker::Reader &rd) |
Parses a block, including the type and length fields. | |
A block containing a sequence of relocations between two blocks, either the offset or segment parts.
|
overridevirtual |
Adds block specific fields.
Reimplemented from PCOS::CMDFormat::MemoryBlock.
|
overridevirtual |
Display block specific contents.
Reimplemented from PCOS::CMDFormat::MemoryBlock.
|
overridevirtual |
The length of the block, not including the type and length fields.
Reimplemented from PCOS::CMDFormat::MemoryBlock.
|
overridevirtual |
Fills the contents of this object.
length | The number of bytes in the block, not including the type and length fields |
Reimplemented from PCOS::CMDFormat::MemoryBlock.
|
overridevirtual |
Writes the contents of the block to the file, including the type and length fields.
Reimplemented from PCOS::CMDFormat::MemoryBlock.