RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
OMF::OMFFormat::Record< RecordTypeByte, FormatType, ModuleType > Class Template Referenceabstract

Base class representing OMF record types. More...

#include <omf.h>

Inheritance diagram for OMF::OMFFormat::Record< RecordTypeByte, FormatType, ModuleType >:
OMF::OMF51Format::DebugItemsRecord OMF::OMF51Format::ExternalDefinitionsRecord OMF::OMF51Format::FixupRecord OMF::OMF51Format::ModuleEndRecord OMF::OMF51Format::ModuleHeaderRecord OMF::OMF51Format::PublicSymbolsRecord OMF::OMF51Format::ScopeDefinitionRecord OMF::OMF51Format::SegmentDefinitionsRecord OMF::OMF80Format::ExternalDefinitionsRecord OMF::OMF80Format::ExternalReferencesRecord OMF::OMF80Format::ModuleAncestorRecord OMF::OMF80Format::ModuleEndRecord OMF::OMF80Format::ModuleHeaderRecord OMF::OMF80Format::NamedCommonDefinitionsRecord OMF::OMF80Format::RelocationsRecord OMF::OMF80Format::SymbolDefinitionsRecord OMF::OMF86Format::AliasDefinitionRecord OMF::OMF86Format::BackpatchRecord OMF::OMF86Format::BlockDefinitionRecord OMF::OMF86Format::CommentRecord OMF::OMF86Format::DebugSymbolsRecord OMF::OMF86Format::EndRecord OMF::OMF86Format::ExternalNamesDefinitionRecord OMF::OMF86Format::FixupRecord OMF::OMF86Format::GroupDefinitionRecord OMF::OMF86Format::InitializedCommunalDataRecord OMF::OMF86Format::LineNumbersRecord OMF::OMF86Format::ListOfNamesRecord OMF::OMF86Format::LogicalDataRecord OMF::OMF86Format::ModuleEndRecord OMF::OMF86Format::ModuleHeaderRecord OMF::OMF86Format::NamedBackpatchRecord OMF::OMF86Format::OMFVersionNumberRecord OMF::OMF86Format::OverlayDefinitionRecord OMF::OMF86Format::PhysicalDataRecord OMF::OMF86Format::RegisterInitializationRecord OMF::OMF86Format::RelocatableDataRecord OMF::OMF86Format::SegmentDefinitionRecord OMF::OMF86Format::SymbolLineNumbersRecord OMF::OMF86Format::SymbolsDefinitionRecord OMF::OMF86Format::TISLibraryEndRecord OMF::OMF86Format::TISLibraryHeaderRecord OMF::OMF86Format::TypeDefinitionRecord OMF::OMF86Format::VendorExtensionRecord OMF::OMF96Format::BlockDefinitionRecord OMF::OMF96Format::ExternalDefinitionsRecord OMF::OMF96Format::ModuleAncestorRecord OMF::OMF96Format::ModuleEndRecord OMF::OMF96Format::ModuleHeaderRecord OMF::OMF96Format::RelocationRecord OMF::OMF96Format::SegmentDefinitionsRecord OMF::OMF96Format::SymbolDefinitionsRecord OMF::OMF96Format::TypeDefinitionRecord OMF::OMFFormat::ContentRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::EmptyRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::LibraryDictionaryRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::LibraryHeaderRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::LibraryModuleLocationsRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::LibraryModuleNamesRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::LineNumbersRecord< RecordTypeByte, FormatType, ModuleType > OMF::OMFFormat::UnknownRecord< RecordTypeByte, FormatType, ModuleType >

Public Member Functions

 Record (RecordTypeByte record_type=RecordTypeByte(0))
 
offset_t RecordEnd () const
 
virtual void ReadRecordContents (FormatType *omf, ModuleType *mod, Linker::Reader &rd)=0
 Reads the record contents, except for the type, length and checksum.
 
virtual uint16_t GetRecordSize (FormatType *omf, ModuleType *mod) const =0
 Calculates the required bytes to write the record, might be less than record_length.
 
virtual void WriteRecordContents (FormatType *omf, ModuleType *mod, ChecksumWriter &wr) const =0
 Writes the record contents, except for the type, length and checksum.
 
virtual void WriteRecord (FormatType *omf, ModuleType *mod, Linker::Writer &wr) const
 Writes the full record.
 
virtual void CalculateValues (FormatType *omf, ModuleType *mod)
 Updates all fields that will be used for writing an OMF module, should be called before output.
 
virtual void ResolveReferences (FormatType *omf, ModuleType *mod)
 Resolves any fields read from an OMF module, should be called after inpnut.
 
virtual void DumpAddFields (Dumper::Dumper &dump, Dumper::Region &region, const FormatType *omf, const ModuleType *mod, size_t record_index) const
 
virtual void Dump (Dumper::Dumper &dump, const FormatType *omf, const ModuleType *mod, size_t record_index) const
 
bool Is32Bit (FormatType *omf) const
 Records are 32-bit if the least significant bit of their record type is set (only meaningful for OMF86Format)
 
size_t GetOffsetSize (FormatType *omf) const
 The number of bytes in an offset appearing inside the record, 2 for 16-bit records, 4 for 32-bit records (only meaningful for OMF86Format)
 

Public Attributes

offset_t record_offset
 Offset of record within the file.
 
uint16_t record_length
 Length of record body file, excluding the type byte and 2-byte length field.
 
RecordTypeByte record_type
 A byte value identifying the type of record.
 

Detailed Description

template<typename RecordTypeByte, typename FormatType, typename ModuleType>
class OMF::OMFFormat::Record< RecordTypeByte, FormatType, ModuleType >

Base class representing OMF record types.

Any record type is expected to extend this class. If several record types have the same or similar layout, they can share the same class, since the record type can be determined using the record_type field.

Member Function Documentation

◆ GetRecordSize()

template<typename RecordTypeByte , typename FormatType , typename ModuleType >
virtual uint16_t OMF::OMFFormat::Record< RecordTypeByte, FormatType, ModuleType >::GetRecordSize ( FormatType * omf,
ModuleType * mod ) const
pure virtual

◆ ReadRecordContents()

template<typename RecordTypeByte , typename FormatType , typename ModuleType >
virtual void OMF::OMFFormat::Record< RecordTypeByte, FormatType, ModuleType >::ReadRecordContents ( FormatType * omf,
ModuleType * mod,
Linker::Reader & rd )
pure virtual

◆ WriteRecordContents()

template<typename RecordTypeByte , typename FormatType , typename ModuleType >
virtual void OMF::OMFFormat::Record< RecordTypeByte, FormatType, ModuleType >::WriteRecordContents ( FormatType * omf,
ModuleType * mod,
ChecksumWriter & wr ) const
pure virtual

The documentation for this class was generated from the following file: