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 (const std::shared_ptr< Linker::Reader > &rd, size_t max_bytes=size_t(-1))
 Reads a string prefixed with a length byte.
 
static void WriteString (const std::shared_ptr< ChecksumWriter > &wr, std::string text)
 Writes a string prefixed with a length byte.
 
static index_t ReadIndex (const std::shared_ptr< Linker::Reader > &rd)
 Parses a 1 or 2 byte index value.
 
static void WriteIndex (const std::shared_ptr< 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< OMFFormat > ReadOMFFile (const std::shared_ptr< 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
 The offset of the first byte used by this format in the file it is stored in.
 

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 (const std::shared_ptr< Reader > &rd)=0
 Loads file into memory.
 
offset_t WriteFile (const std::shared_ptr< 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.
 
virtual void SetFileOffset (offset_t new_offset)
 Attempts to alter the offset to the first byte of the format from the beginning of the file.
 
offset_t ImageSize () const override
 Retrieves the offset of the byte after the last one belonging to this format from the first one.
 
- Public Member Functions inherited from Linker::Contents
virtual std::shared_ptr< const Image > AsImage () const
 Retrieves a randomly accessible image.
 
std::shared_ptr< Image > AsImage ()
 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: