RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
A single record inside the segment body, also represents an END record. More...
#include <gsos.h>
Public Member Functions | |
Record (record_type type) | |
virtual offset_t | GetLength (const Segment &segment) const |
Returns the size of the record, as stored in the file. | |
virtual offset_t | GetMemoryLength (const Segment &segment, offset_t current_address) const |
Returns the amount of memory the record occupies when loaded into memory. Most records have a length of 0. | |
virtual void | ReadFile (Segment &segment, Linker::Reader &rd) |
virtual void | WriteFile (const Segment &segment, Linker::Writer &wr) const |
virtual void | Dump (Dumper::Dumper &dump, const OMFFormat &omf, const Segment &segment, unsigned index, offset_t file_offset, offset_t address) const |
Displays information pertaining to this record. | |
virtual void | AddFields (Dumper::Dumper &dump, Dumper::Region ®ion, const OMFFormat &omf, const Segment &segment, unsigned index, offset_t file_offset, offset_t address) const |
Adds any further fields to the file region that encompasses this record. | |
virtual void | AddSignals (Dumper::Block &block, offset_t current_segment_offset) const |
If this is a relocation record, add the relocation signals to the block. | |
virtual void | ReadData (size_t bytes, offset_t offset, void *buffer) const |
Attempts to read data from the in-memory image, if possible, it can be assumed that offset + bytes <= GetMemoryLength() | |
Public Attributes | |
record_type | type |
A single record inside the segment body, also represents an END record.
|
virtual |
Adds any further fields to the file region that encompasses this record.
Reimplemented in Apple::OMFFormat::Segment::ValueRecord, Apple::OMFFormat::Segment::RelocationRecord, Apple::OMFFormat::Segment::IntersegmentRelocationRecord, Apple::OMFFormat::Segment::StringRecord, Apple::OMFFormat::Segment::LabelRecord, Apple::OMFFormat::Segment::LabelExpressionRecord, Apple::OMFFormat::Segment::RangeRecord, Apple::OMFFormat::Segment::ExpressionRecord, Apple::OMFFormat::Segment::RelativeExpressionRecord, Apple::OMFFormat::Segment::EntryRecord, and Apple::OMFFormat::Segment::SuperCompactRecord.
|
virtual |
If this is a relocation record, add the relocation signals to the block.
Reimplemented in Apple::OMFFormat::Segment::RelocationRecord, and Apple::OMFFormat::Segment::SuperCompactRecord.
|
virtual |
Displays information pertaining to this record.
dump | The dumper interface |
omf | The entire file |
segment | The segment the record is part of |
index | 0-based index of the record within the segment |
file_offset | Full file offset, including segment start offset, that this record starts at |
address | The current memory pointer when this record is interpreted |
Reimplemented in Apple::OMFFormat::Segment::DataRecord, and Apple::OMFFormat::Segment::SuperCompactRecord.
|
virtual |
Returns the size of the record, as stored in the file.
segment | The segment the record is part of |
Reimplemented in Apple::OMFFormat::Segment::DataRecord, Apple::OMFFormat::Segment::ValueRecord, Apple::OMFFormat::Segment::RelocationRecord, Apple::OMFFormat::Segment::IntersegmentRelocationRecord, Apple::OMFFormat::Segment::StringRecord, Apple::OMFFormat::Segment::LabelRecord, Apple::OMFFormat::Segment::LabelExpressionRecord, Apple::OMFFormat::Segment::RangeRecord, Apple::OMFFormat::Segment::ExpressionRecord, Apple::OMFFormat::Segment::RelativeExpressionRecord, Apple::OMFFormat::Segment::EntryRecord, and Apple::OMFFormat::Segment::SuperCompactRecord.
|
virtual |
Returns the amount of memory the record occupies when loaded into memory. Most records have a length of 0.
segment | The segment the record is part of |
Reimplemented in Apple::OMFFormat::Segment::DataRecord, Apple::OMFFormat::Segment::ValueRecord, and Apple::OMFFormat::Segment::ExpressionRecord.
|
virtual |
Attempts to read data from the in-memory image, if possible, it can be assumed that offset + bytes <= GetMemoryLength()
Reimplemented in Apple::OMFFormat::Segment::DataRecord, Apple::OMFFormat::Segment::ValueRecord, and Apple::OMFFormat::Segment::ExpressionRecord.