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

Base class for a family of Intel Relocatable Object formats. More...

#include <omf.h>

Inheritance diagram for OMF::OMFFormat:
Linker::Format Linker::Contents OMF::OMF51Format OMF::OMF80Format OMF::OMF86Format OMF::OMF96Format

Classes

class  ContentRecord
 A record representing data to be loaded into a segment. More...
 
class  EmptyRecord
 A record type that has no contents, aside from the type, length and checksum, used for BLKEND. More...
 
class  LibraryDictionaryRecord
 All public symbols of all modules, used for LIBDIC. More...
 
class  LibraryHeaderRecord
 Library header record, used for LIBHED. More...
 
class  LibraryModuleLocationsRecord
 Library module offsets, used for LIBLOC. More...
 
class  LibraryModuleNamesRecord
 Library module names, used for LIBNAM. More...
 
class  LineNumbersRecord
 A record representing line number information. More...
 
class  Record
 Base class representing OMF record types. More...
 
class  UnknownRecord
 An unparsed record type, if the format is not recognized. More...
 

Public Types

typedef uint16_t index_t
 An index referring to an element or definition in the file, typically stored as 1 or 2 bytes, used for OMF86 and OMF96.
 

Static Public Member Functions

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.
 
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::shared_ptr< OMFFormatReadOMFFile (Linker::Reader &rd)
 Attempts to parse an OMF file, whether OMF80, OMF86, OMF51 or OMF96.
 

Public Attributes

offset_t file_size = 0
 Used to calculate record offsets when generating OMF file.
 
- Public Attributes inherited from Linker::Format
offset_t file_offset
 

Additional Inherited Members

- Public Member Functions inherited from Linker::Format
 Format (offset_t file_offset=0)
 
virtual void Clear ()
 Resets all fields to their default values, deallocate memory.
 
virtual void ReadFile (Reader &rd)=0
 Loads file into memory.
 
offset_t WriteFile (Writer &wr) const override=0
 Stores data in memory to file.
 
virtual void Dump (Dumper::Dumper &dump) const
 Display file contents in a nice manner.
 
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.
 
- Public Member Functions inherited from Linker::Contents
virtual std::shared_ptr< const ImageAsImage () const
 Retrieves a randomly accessible image.
 
std::shared_ptr< ImageAsImage ()
 Retrieves a randomly accessible image.
 

Detailed Description

Base class for a family of Intel Relocatable Object formats.


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