RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
Intel Relocatable Object Module format, used by various 16/32-bit DOS based compilers and linkers, including 16-bit Microsoft compilers, Borland and Watcom compilers. More...
#include <omf.h>
Classes | |
class | AliasDefinitionRecord |
class | BackpatchRecord |
class | BaseSpecification |
Specification for the group and segment of some reference, and the frame if both are 0. More... | |
class | BlockDefinitionRecord |
A record that defines a block, used for BLKDEF records (Intel only) More... | |
class | BlockIndex |
A rich container for indexes referring to a BLKDEF record. More... | |
class | CommentRecord |
class | DataBlock |
Represents a sequence of data, with optional repeated parts, used by RelocatableDataRecord, PhysicalDataRecord and LogicalDataRecord. More... | |
class | DebugSymbolsRecord |
Record to store debug symbols, used for DEBSYM (Intel only) More... | |
class | EmptyRecord |
A record type that has no contents, aside from the type, length and checksum, used for BLKEND. More... | |
class | EndRecord |
Record to signal termination of an overloay or block, used for ENDBLK (Intel only) More... | |
class | ExportDefinitionRecord |
class | ExternalAssociationRecord |
class | ExternalIndex |
A rich container for indexes referring to symbols in an EXTDEF, LEXTDEF, COMDEF, LCOMDEF, CEXTDEF record. More... | |
class | ExternalName |
An external name declaration, appearing in an EXTDEF, LEXTDEF, COMDEF, LCOMDEF or CEXTDEF record. More... | |
class | ExternalNamesDefinitionRecord |
A record defining several external or common symbols, used for EXTDEF, LEXTDEF, CEXTDEF, COMDEF and LCOMDEF. More... | |
class | FixupRecord |
A record containing relocation data, used for FIXUPP. More... | |
class | GroupDefinitionRecord |
A record that defines a segment group, used for GRPDEF records. More... | |
class | GroupIndex |
A rich container for indexes referring to a GRPDEF record. More... | |
class | ImportDefinitionRecord |
class | IncrementalCompilationRecord |
class | InitializedCommunalDataRecord |
class | IntelLibraryDictionaryRecord |
All public symbols of all modules, used for LIBDIC (Intel only) More... | |
class | IntelLibraryHeaderRecord |
Library header record, used for LIBHED (Intel only) More... | |
class | IntelLibraryModuleLocationsRecord |
Library module offsets, used for LIBLOC (Intel only) More... | |
class | IntelLibraryModuleNamesRecord |
Library module names, used for LIBNAM (Intel only) More... | |
class | LibraryEndRecord |
class | LibraryHeaderRecord |
class | LineNumber |
Represents a line number, used by LineNumbersRecord and SymbolLineNumbersRecord. More... | |
class | LineNumbersRecord |
Stores as debugging data the line number information, used for LINNUM. More... | |
class | LinkerDirectivesRecord |
class | ListOfNamesRecord |
A list of names to be referenced, used for LNAMES and LLNAMES records. More... | |
class | LogicalDataRecord |
Logical enumerated or iterated data, used for LEDATA and LIDATA. More... | |
class | Module |
Represents a single module inside the OMF file. More... | |
class | ModuleEndRecord |
Terminates a module, used for MODEND. More... | |
class | ModuleHeaderRecord |
A header record, used for THEADR and LHEADR. More... | |
class | NamedBackpatchRecord |
class | NameIndex |
A rich container for indexes referring to a LNAME/LLNAME declaration. More... | |
class | NoSegmentPaddingRecord |
class | OMFExtensionRecord |
class | OMFVersionNumberRecord |
class | OverlayDefinitionRecord |
A record that defines an overlay, used for OVLDEF records. More... | |
class | OverlayIndex |
A rich container for indexes referring to a OVLDEF record. More... | |
class | PhysicalDataRecord |
Physical enumerated or iterated data, used for PEDATA and PIDATA (Intel only) More... | |
class | Record |
Record type appearing specifically in an OMF86 file. More... | |
class | Reference |
Represents a reference for a relocation. More... | |
class | RegisterInitializationRecord |
Initialization values for registers, used for REGINT (Intel only) More... | |
class | RelocatableDataRecord |
Relocatable enumerated or iterated data, used for REDATA and RIDATA (Intel only) More... | |
class | RModuleHeaderRecord |
A header record for an R-Module, used for RHEADR (not part of TIS OMF) More... | |
class | SegmentDefinitionRecord |
A record that defines a segment, used for SEGDEF records. More... | |
class | SegmentIndex |
A rich container for indexes referring to a SEGDEF record. More... | |
class | SymbolDefinition |
Represents a symbol definition, used by SymbolDefinitionsRecord and DebugSymbolsRecord. More... | |
class | SymbolLineNumbersRecord |
class | SymbolsDefinitionRecord |
A record that defines a symbol, used by PUBDEF, LPUBDEF, LOCSYM. More... | |
class | TypeDefinitionRecord |
A record that defines a data type, used for TYPDEF records. More... | |
class | TypeIndex |
A rich container for indexes referring to a TYPDEF record. More... | |
struct | UsesAbsolute |
Represents a MethodAbsolute value. More... | |
struct | UsesSource |
Represents a MethodSource value. More... | |
struct | UsesTarget |
Represents a MethodTarget value. More... | |
class | VendorExtensionRecord |
Public Types | |
enum | omf_version_t { OMF_VERSION_INTEL_40 = 1 , OMF_VERSION_PHARLAP , OMF_VERSION_MICROSOFT , OMF_VERSION_IBM , OMF_VERSION_TIS_11 } |
Represents the various variants of the OMF file format, some of them are incompatible. More... | |
enum | { MethodSegment = 0 , MethodGroup = 1 , MethodExternal = 2 , MethodFrame = 3 , MethodSource = 4 , MethodTarget = 5 , MethodAbsolute = 6 } |
Reference types for relocations, for targets and frames. More... | |
typedef uint16_t | index_t |
An index referring to an element or definition in the file, typically stored as 1 or 2 bytes. | |
typedef uint16_t | FrameNumber |
Represents a MethodFrame value. | |
Public Member Functions | |
void | ReadFile (Linker::Reader &rd) override |
Loads file into memory. | |
offset_t | WriteFile (Linker::Writer &wr) const override |
Stores data in memory to file. | |
void | Dump (Dumper::Dumper &dump) const override |
Display file contents in a nice manner. | |
void | GenerateModule (Linker::Module &module) const override |
Loads the information into a module object, a convenience method when there is a single module generated. | |
![]() | |
Format (offset_t file_offset=0) | |
virtual void | Clear () |
Resets all fields to their default values, deallocate memory. | |
offset_t | ImageSize () const override |
Retrieves size of stored data. | |
offset_t | WriteFile (Writer &wr, offset_t count, offset_t offset=0) const override |
Writes data of non-zero filled sections. | |
![]() | |
virtual std::shared_ptr< const ActualImage > | AsImage () const |
Retrieves a randomly accessible image. | |
std::shared_ptr< ActualImage > | AsImage () |
Retrieves a randomly accessible image. | |
![]() | |
virtual void | SetupOptions (std::shared_ptr< OutputFormat > format) |
Initializes the reader for linking purposes. | |
virtual void | ProduceModule (ModuleCollector &linker, Reader &rd, std::string file_name) |
Reads a file and loads the information into a module object. | |
virtual void | ProduceModule (Module &module, Reader &rd) |
Reads a file and loads the information into a module object, a convenience method when there is a single module generated. | |
virtual void | GenerateModule (ModuleCollector &linker, std::string file_name, bool is_library=false) const |
Loads the information into a module object. | |
virtual bool | FormatProvidesSegmentation () const |
Whether the format enables multiple x86 segments. | |
virtual bool | FormatRequiresDataStreamFix () const |
Whether the generated file might contain bugs that require fixing. | |
virtual bool | FormatProvidesResources () const |
Whether the format supports resources. | |
virtual bool | FormatProvidesLibraries () const |
Whether the format enables importing/exporting libraries. | |
Static Public Member Functions | |
static index_t | ReadIndex (Linker::Reader &rd) |
Parses a 1 or 2 byte index value. | |
static void | WriteIndex (ChecksumWriter &wr, index_t index) |
Produces a 1 or 2 byte index value. | |
static size_t | IndexSize (index_t index) |
Determines if the index value requires 1 or 2 bytes to store. | |
![]() | |
static std::string | ReadString (Linker::Reader &rd, size_t max_bytes=size_t(-1)) |
Reads a string prefixed with a length byte. | |
static void | WriteString (ChecksumWriter &wr, std::string text) |
Writes a string prefixed with a length byte. | |
Public Attributes | |
omf_version_t | omf_version = OMF_VERSION_TIS_11 |
The variant of the OMF format, needed to handle certain fields. | |
std::vector< Module > | modules |
List of modules appearing in an OMF file, typically only one for an object file. | |
uint16_t | page_size |
![]() | |
std::vector< std::shared_ptr< Record > > | records |
The ordered collection of records contained in the file. | |
![]() | |
offset_t | file_offset |
Intel Relocatable Object Module format, used by various 16/32-bit DOS based compilers and linkers, including 16-bit Microsoft compilers, Borland and Watcom compilers.
anonymous enum |
Reference types for relocations, for targets and frames.
Represents the various variants of the OMF file format, some of them are incompatible.
|
overridevirtual |
Display file contents in a nice manner.
Reimplemented from Linker::Format.
|
overridevirtual |
Loads the information into a module object, a convenience method when there is a single module generated.
Reimplemented from Linker::InputFormat.
|
overridevirtual |
Loads file into memory.
Implements Linker::Format.
|
overridevirtual |
Stores data in memory to file.
Implements Linker::Format.