RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OMF::OMF86Format::Record Class Referenceabstract

Record type appearing specifically in an OMF86 file. More...

#include <omf.h>

Inheritance diagram for OMF::OMF86Format::Record:
OMF::OMFFormat::Record OMF::OMF86Format::AliasDefinitionRecord OMF::OMF86Format::BackpatchRecord OMF::OMF86Format::BlockDefinitionRecord OMF::OMF86Format::CommentRecord OMF::OMF86Format::DebugSymbolsRecord OMF::OMF86Format::EmptyRecord OMF::OMF86Format::EndRecord OMF::OMF86Format::ExternalNamesDefinitionRecord OMF::OMF86Format::FixupRecord OMF::OMF86Format::GroupDefinitionRecord OMF::OMF86Format::InitializedCommunalDataRecord OMF::OMF86Format::IntelLibraryDictionaryRecord OMF::OMF86Format::IntelLibraryHeaderRecord OMF::OMF86Format::IntelLibraryModuleLocationsRecord OMF::OMF86Format::IntelLibraryModuleNamesRecord OMF::OMF86Format::LibraryEndRecord OMF::OMF86Format::LibraryHeaderRecord 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::TypeDefinitionRecord OMF::OMF86Format::VendorExtensionRecord

Public Types

enum  record_type_t {
  RHEADR = 0x6E , REGINT = 0x70 , REDATA = 0x72 , RIDATA = 0x74 ,
  OVLDEF = 0x76 , ENDREC = 0x78 , BLKDEF = 0x7A , BLKEND = 0x7C ,
  DEBSYM = 0x7E , THEADR = 0x80 , LHEADR = 0x82 , PEDATA = 0x84 ,
  PIDATA = 0x86 , COMENT = 0x88 , MODEND16 = 0x8A , MODEND = 0x8A ,
  MODEND32 = 0x8B , EXTDEF = 0x8C , TYPDEF = 0x8E , PUBDEF16 = 0x90 ,
  PUBDEF = 0x90 , PUBDEF32 = 0x91 , LOCSYM = 0x92 , LINNUM = 0x94 ,
  LNAMES = 0x96 , SEGDEF = 0x98 , GRPDEF = 0x9A , FIXUPP16 = 0x9C ,
  FIXUPP = 0x9C , FIXUPP32 = 0x9D , LEDATA16 = 0xA0 , LEDATA = 0xA0 ,
  LEDATA32 = 0xA1 , LIDATA16 = 0xA2 , LIDATA = 0xA2 , LIDATA32 = 0xA3 ,
  LIBHED = 0xA4 , LIBNAM = 0xA6 , LIBLOC = 0xA8 , LIBDIC = 0xAA ,
  COMDEF = 0xB0 , BAKPAT16 = 0xB2 , BAKPAT = 0xB2 , BAKPAT32 = 0xB3 ,
  LEXTDEF16 = 0xB4 , LEXTDEF = 0xB4 , LEXTDEF32 = 0xB5 , LPUBDEF16 = 0xB6 ,
  LPUBDEF = 0xB6 , LPUBDEF32 = 0xB7 , LCOMDEF = 0xB8 , CEXTDEF = 0xBC ,
  COMDAT16 = 0xC2 , COMDAT = 0xC2 , COMDAT32 = 0xC3 , LINSYM16 = 0xC4 ,
  LINSYM = 0xC4 , LINSYM32 = 0xC5 , ALIAS = 0xC6 , NBKPAT16 = 0xC8 ,
  NBKPAT = 0xC8 , NBKPAT32 = 0xC9 , LLNAMES = 0xCA , VERNUM = 0xCC ,
  VENDEXT = 0xCE , LibraryHeader = 0xF0 , LibraryEnd = 0xF1
}
 The recognized record types in an OMF86 file.
 

Public Member Functions

 Record (record_type_t record_type)
 
void ReadRecordContents (OMFFormat *omf, Linker::Reader &rd) override
 Converts omf to OMF86Format and calls the other implementation of ReadRecordContents.
 
uint16_t GetRecordSize (OMFFormat *omf) const override
 Converts omf to OMF86Format and calls the other implementation of GetRecordSize.
 
void WriteRecordContents (OMFFormat *omf, ChecksumWriter &wr) const override
 Converts omf to OMF86Format and calls the other implementation of WriteRecordContents.
 
virtual void ReadRecordContents (OMF86Format *omf, Linker::Reader &rd)=0
 Reads the record contents, except for the type, length and checksum.
 
virtual uint16_t GetRecordSize (OMF86Format *omf) const =0
 Calculates the required bytes to write the record, might be less than record_length.
 
virtual void WriteRecordContents (OMF86Format *omf, ChecksumWriter &wr) const =0
 Writes the record contents, except for the type, length and checksum.
 
virtual void CalculateValues (OMF86Format *omf, Module *mod)
 Updates all fields that will be used for writing an OMF module, should be called before output.
 
virtual void ResolveReferences (OMF86Format *omf, Module *mod)
 Resolves any fields read from an OMF module, should be called after inpnut.
 
bool Is32Bit (OMF86Format *omf) const
 Records are 32-bit if the least significant bit of their record type is set.
 
size_t GetOffsetSize (OMF86Format *omf) const
 The number of bytes in an offset appearing inside the record, 2 for 16-bit records, 4 for 32-bit records.
 
- Public Member Functions inherited from OMF::OMFFormat::Record
 Record (uint8_t record_type=0)
 
virtual void WriteRecord (OMFFormat *omf, Linker::Writer &wr) const
 Writes the full record.
 

Static Public Member Functions

static std::shared_ptr< OMFFormat::RecordReadRecord (OMF86Format *omf, Linker::Reader &rd)
 Parses and returns an instance of the next record.
 

Additional Inherited Members

- Public Attributes inherited from OMF::OMFFormat::Record
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.
 
uint8_t record_type
 A byte value identifying the type of record.
 

Detailed Description

Record type appearing specifically in an OMF86 file.

Member Function Documentation

◆ CalculateValues()

void OMF86Format::Record::CalculateValues ( OMF86Format * omf,
Module * mod )
virtual

◆ GetRecordSize() [1/2]

virtual uint16_t OMF::OMF86Format::Record::GetRecordSize ( OMF86Format * omf) const
pure virtual

Calculates the required bytes to write the record, might be less than record_length.

Implemented in OMF::OMF86Format::EmptyRecord, OMF::OMF86Format::ModuleHeaderRecord, OMF::OMF86Format::RModuleHeaderRecord, OMF::OMF86Format::ListOfNamesRecord, OMF::OMF86Format::SegmentDefinitionRecord, OMF::OMF86Format::GroupDefinitionRecord, OMF::OMF86Format::TypeDefinitionRecord, OMF::OMF86Format::SymbolsDefinitionRecord, OMF::OMF86Format::ExternalNamesDefinitionRecord, OMF::OMF86Format::LineNumbersRecord, OMF::OMF86Format::BlockDefinitionRecord, OMF::OMF86Format::DebugSymbolsRecord, OMF::OMF86Format::RelocatableDataRecord, OMF::OMF86Format::PhysicalDataRecord, OMF::OMF86Format::LogicalDataRecord, OMF::OMF86Format::FixupRecord, OMF::OMF86Format::OverlayDefinitionRecord, OMF::OMF86Format::EndRecord, OMF::OMF86Format::RegisterInitializationRecord, OMF::OMF86Format::ModuleEndRecord, OMF::OMF86Format::IntelLibraryHeaderRecord, OMF::OMF86Format::IntelLibraryModuleNamesRecord, OMF::OMF86Format::IntelLibraryModuleLocationsRecord, OMF::OMF86Format::IntelLibraryDictionaryRecord, OMF::OMF86Format::BackpatchRecord, OMF::OMF86Format::NamedBackpatchRecord, OMF::OMF86Format::InitializedCommunalDataRecord, OMF::OMF86Format::SymbolLineNumbersRecord, OMF::OMF86Format::AliasDefinitionRecord, OMF::OMF86Format::OMFVersionNumberRecord, OMF::OMF86Format::VendorExtensionRecord, OMF::OMF86Format::CommentRecord, OMF::OMF86Format::LibraryHeaderRecord, OMF::OMF86Format::LibraryEndRecord, OMF::OMF86Format::EmptyRecord, OMF::OMF86Format::ModuleHeaderRecord, OMF::OMF86Format::RModuleHeaderRecord, OMF::OMF86Format::ListOfNamesRecord, OMF::OMF86Format::SegmentDefinitionRecord, OMF::OMF86Format::GroupDefinitionRecord, OMF::OMF86Format::TypeDefinitionRecord, OMF::OMF86Format::SymbolsDefinitionRecord, OMF::OMF86Format::ExternalNamesDefinitionRecord, OMF::OMF86Format::LineNumbersRecord, OMF::OMF86Format::BlockDefinitionRecord, OMF::OMF86Format::DebugSymbolsRecord, OMF::OMF86Format::RelocatableDataRecord, OMF::OMF86Format::PhysicalDataRecord, OMF::OMF86Format::LogicalDataRecord, OMF::OMF86Format::FixupRecord, OMF::OMF86Format::OverlayDefinitionRecord, OMF::OMF86Format::EndRecord, OMF::OMF86Format::RegisterInitializationRecord, OMF::OMF86Format::ModuleEndRecord, OMF::OMF86Format::IntelLibraryHeaderRecord, OMF::OMF86Format::IntelLibraryModuleNamesRecord, OMF::OMF86Format::IntelLibraryModuleLocationsRecord, OMF::OMF86Format::IntelLibraryDictionaryRecord, OMF::OMF86Format::BackpatchRecord, OMF::OMF86Format::NamedBackpatchRecord, OMF::OMF86Format::InitializedCommunalDataRecord, OMF::OMF86Format::SymbolLineNumbersRecord, OMF::OMF86Format::AliasDefinitionRecord, OMF::OMF86Format::OMFVersionNumberRecord, OMF::OMF86Format::VendorExtensionRecord, OMF::OMF86Format::CommentRecord, OMF::OMF86Format::LibraryHeaderRecord, and OMF::OMF86Format::LibraryEndRecord.

◆ GetRecordSize() [2/2]

uint16_t OMF86Format::Record::GetRecordSize ( OMFFormat * omf) const
overridevirtual

◆ ReadRecordContents() [1/2]

virtual void OMF::OMF86Format::Record::ReadRecordContents ( OMF86Format * omf,
Linker::Reader & rd )
pure virtual

Reads the record contents, except for the type, length and checksum.

Implemented in OMF::OMF86Format::EmptyRecord, OMF::OMF86Format::ModuleHeaderRecord, OMF::OMF86Format::RModuleHeaderRecord, OMF::OMF86Format::ListOfNamesRecord, OMF::OMF86Format::SegmentDefinitionRecord, OMF::OMF86Format::GroupDefinitionRecord, OMF::OMF86Format::TypeDefinitionRecord, OMF::OMF86Format::SymbolsDefinitionRecord, OMF::OMF86Format::ExternalNamesDefinitionRecord, OMF::OMF86Format::LineNumbersRecord, OMF::OMF86Format::BlockDefinitionRecord, OMF::OMF86Format::DebugSymbolsRecord, OMF::OMF86Format::RelocatableDataRecord, OMF::OMF86Format::PhysicalDataRecord, OMF::OMF86Format::LogicalDataRecord, OMF::OMF86Format::FixupRecord, OMF::OMF86Format::OverlayDefinitionRecord, OMF::OMF86Format::EndRecord, OMF::OMF86Format::RegisterInitializationRecord, OMF::OMF86Format::ModuleEndRecord, OMF::OMF86Format::IntelLibraryHeaderRecord, OMF::OMF86Format::IntelLibraryModuleNamesRecord, OMF::OMF86Format::IntelLibraryModuleLocationsRecord, OMF::OMF86Format::IntelLibraryDictionaryRecord, OMF::OMF86Format::BackpatchRecord, OMF::OMF86Format::NamedBackpatchRecord, OMF::OMF86Format::InitializedCommunalDataRecord, OMF::OMF86Format::SymbolLineNumbersRecord, OMF::OMF86Format::AliasDefinitionRecord, OMF::OMF86Format::OMFVersionNumberRecord, OMF::OMF86Format::VendorExtensionRecord, OMF::OMF86Format::CommentRecord, OMF::OMF86Format::LibraryHeaderRecord, OMF::OMF86Format::LibraryEndRecord, OMF::OMF86Format::EmptyRecord, OMF::OMF86Format::ModuleHeaderRecord, OMF::OMF86Format::RModuleHeaderRecord, OMF::OMF86Format::ListOfNamesRecord, OMF::OMF86Format::SegmentDefinitionRecord, OMF::OMF86Format::GroupDefinitionRecord, OMF::OMF86Format::TypeDefinitionRecord, OMF::OMF86Format::SymbolsDefinitionRecord, OMF::OMF86Format::ExternalNamesDefinitionRecord, OMF::OMF86Format::LineNumbersRecord, OMF::OMF86Format::BlockDefinitionRecord, OMF::OMF86Format::DebugSymbolsRecord, OMF::OMF86Format::RelocatableDataRecord, OMF::OMF86Format::PhysicalDataRecord, OMF::OMF86Format::LogicalDataRecord, OMF::OMF86Format::FixupRecord, OMF::OMF86Format::OverlayDefinitionRecord, OMF::OMF86Format::EndRecord, OMF::OMF86Format::RegisterInitializationRecord, OMF::OMF86Format::ModuleEndRecord, OMF::OMF86Format::IntelLibraryHeaderRecord, OMF::OMF86Format::IntelLibraryModuleNamesRecord, OMF::OMF86Format::IntelLibraryModuleLocationsRecord, OMF::OMF86Format::IntelLibraryDictionaryRecord, OMF::OMF86Format::BackpatchRecord, OMF::OMF86Format::NamedBackpatchRecord, OMF::OMF86Format::InitializedCommunalDataRecord, OMF::OMF86Format::SymbolLineNumbersRecord, OMF::OMF86Format::AliasDefinitionRecord, OMF::OMF86Format::OMFVersionNumberRecord, OMF::OMF86Format::VendorExtensionRecord, OMF::OMF86Format::CommentRecord, OMF::OMF86Format::LibraryHeaderRecord, and OMF::OMF86Format::LibraryEndRecord.

◆ ReadRecordContents() [2/2]

void OMF86Format::Record::ReadRecordContents ( OMFFormat * omf,
Linker::Reader & rd )
overridevirtual

◆ ResolveReferences()

void OMF86Format::Record::ResolveReferences ( OMF86Format * omf,
Module * mod )
virtual

◆ WriteRecordContents() [1/2]

virtual void OMF::OMF86Format::Record::WriteRecordContents ( OMF86Format * omf,
ChecksumWriter & wr ) const
pure virtual

Writes the record contents, except for the type, length and checksum.

Implemented in OMF::OMF86Format::EmptyRecord, OMF::OMF86Format::ModuleHeaderRecord, OMF::OMF86Format::RModuleHeaderRecord, OMF::OMF86Format::ListOfNamesRecord, OMF::OMF86Format::SegmentDefinitionRecord, OMF::OMF86Format::GroupDefinitionRecord, OMF::OMF86Format::TypeDefinitionRecord, OMF::OMF86Format::SymbolsDefinitionRecord, OMF::OMF86Format::ExternalNamesDefinitionRecord, OMF::OMF86Format::LineNumbersRecord, OMF::OMF86Format::BlockDefinitionRecord, OMF::OMF86Format::DebugSymbolsRecord, OMF::OMF86Format::RelocatableDataRecord, OMF::OMF86Format::PhysicalDataRecord, OMF::OMF86Format::LogicalDataRecord, OMF::OMF86Format::FixupRecord, OMF::OMF86Format::OverlayDefinitionRecord, OMF::OMF86Format::EndRecord, OMF::OMF86Format::RegisterInitializationRecord, OMF::OMF86Format::ModuleEndRecord, OMF::OMF86Format::IntelLibraryHeaderRecord, OMF::OMF86Format::IntelLibraryModuleNamesRecord, OMF::OMF86Format::IntelLibraryModuleLocationsRecord, OMF::OMF86Format::IntelLibraryDictionaryRecord, OMF::OMF86Format::BackpatchRecord, OMF::OMF86Format::NamedBackpatchRecord, OMF::OMF86Format::InitializedCommunalDataRecord, OMF::OMF86Format::SymbolLineNumbersRecord, OMF::OMF86Format::AliasDefinitionRecord, OMF::OMF86Format::OMFVersionNumberRecord, OMF::OMF86Format::VendorExtensionRecord, OMF::OMF86Format::CommentRecord, OMF::OMF86Format::LibraryHeaderRecord, OMF::OMF86Format::LibraryEndRecord, OMF::OMF86Format::EmptyRecord, OMF::OMF86Format::ModuleHeaderRecord, OMF::OMF86Format::RModuleHeaderRecord, OMF::OMF86Format::ListOfNamesRecord, OMF::OMF86Format::SegmentDefinitionRecord, OMF::OMF86Format::GroupDefinitionRecord, OMF::OMF86Format::TypeDefinitionRecord, OMF::OMF86Format::SymbolsDefinitionRecord, OMF::OMF86Format::ExternalNamesDefinitionRecord, OMF::OMF86Format::LineNumbersRecord, OMF::OMF86Format::BlockDefinitionRecord, OMF::OMF86Format::DebugSymbolsRecord, OMF::OMF86Format::RelocatableDataRecord, OMF::OMF86Format::PhysicalDataRecord, OMF::OMF86Format::LogicalDataRecord, OMF::OMF86Format::FixupRecord, OMF::OMF86Format::OverlayDefinitionRecord, OMF::OMF86Format::EndRecord, OMF::OMF86Format::RegisterInitializationRecord, OMF::OMF86Format::ModuleEndRecord, OMF::OMF86Format::IntelLibraryHeaderRecord, OMF::OMF86Format::IntelLibraryModuleNamesRecord, OMF::OMF86Format::IntelLibraryModuleLocationsRecord, OMF::OMF86Format::IntelLibraryDictionaryRecord, OMF::OMF86Format::BackpatchRecord, OMF::OMF86Format::NamedBackpatchRecord, OMF::OMF86Format::InitializedCommunalDataRecord, OMF::OMF86Format::SymbolLineNumbersRecord, OMF::OMF86Format::AliasDefinitionRecord, OMF::OMF86Format::OMFVersionNumberRecord, OMF::OMF86Format::VendorExtensionRecord, OMF::OMF86Format::CommentRecord, OMF::OMF86Format::LibraryHeaderRecord, and OMF::OMF86Format::LibraryEndRecord.

◆ WriteRecordContents() [2/2]

void OMF86Format::Record::WriteRecordContents ( OMFFormat * omf,
ChecksumWriter & wr ) const
overridevirtual

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