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

A object file typically contains a single module. More...

#include <o65.h>

Classes

struct  exported_global
 
struct  header_option
 Additional entries in the header. More...
 
struct  relocation
 Relocation entries. More...
 

Public Member Functions

void Clear ()
 
bool IsPageRelocatable () const
 Whether file can only be relocated according to a 256 byte page (MODE_PAGE_RELOC is set in mode_word)
 
bool IsChained () const
 Whether another module follows this one (MODE_CHAIN is set in mode_word.
 
int GetWordSize () const
 Return the size of address/offset values in the file, in bytes (2 or 4)
 
offset_t ReadUnsigned (Linker::Reader &rd) const
 Reads a module dependent unsigned word, the size of which is given by GetWordSize()
 
void WriteWord (Linker::Writer &wr, offset_t value) const
 Writes a module dependent word, the size of which is given by GetWordSize()
 
void ReadFile (Linker::Reader &rd)
 
void WriteFile (Linker::Writer &wr)
 
void GenerateModule (Linker::Module &module, Linker::Reader &rd) const
 

Public Attributes

uint16_t mode_word = 0
 The file mode.
 
offset_t code_base = 0
 Base address of code segment.
 
std::shared_ptr< Linker::Writablecode_image = nullptr
 Code segment contents.
 
offset_t data_base = 0
 Base address of data segment.
 
std::shared_ptr< Linker::Writabledata_image = nullptr
 Data segment contents.
 
offset_t bss_base = 0
 Base address of bss segment.
 
offset_t bss_size = 0
 Bss segment size.
 
offset_t zero_base = 0
 Base address of zero segment.
 
offset_t zero_size = 0
 Zero segment size.
 
offset_t stack_size = 0
 Stack segment size.
 
std::vector< header_optionheader_options
 Additional header field entries.
 
std::vector< std::string > undefined_references
 Undefined references appearing in file.
 
std::map< offset_t, relocationcode_relocations
 Relocations within code segment.
 
std::map< offset_t, relocationdata_relocations
 Relocations within data segment.
 
std::vector< exported_globalexported_globals
 Exported global symbols.
 

Static Public Attributes

static const int MODE_ALIGN_MASK = 0x0003
 Bits 0 to 1 in mode_word describing the file alignment.
 
static const int MODE_ALIGN_BYTE = 0x0000
 File alignment is byte.
 
static const int MODE_ALIGN_WORD = 0x0001
 File alignment is 2 byte word.
 
static const int MODE_ALIGN_LONG = 0x0002
 File alignment is 4 byte long word.
 
static const int MODE_ALIGN_PAGE = 0x0003
 File alignment is 256 byte page/block.
 
static const int MODE_CPU_MASK = 0x00F0
 Bits 4 to 7 in mode_word describing CPU instruction set.
 
static const int MODE_CPU_6502 = 0x0000
 
static const int MODE_CPU_65C02 = 0x0010
 
static const int MODE_CPU_65SC02 = 0x0020
 
static const int MODE_CPU_65CE02 = 0x0030
 
static const int MODE_CPU_NMOS = 0x0040
 
static const int MODE_CPU_65816 = 0x0050
 
static const int MODE_BSS_ZERO = 0x0200
 Set if bss should be cleared on load.
 
static const int MODE_CHAIN = 0x0400
 Set if another module follows.
 
static const int MODE_SIMPLE = 0x0800
 Set if code, data and bss are contiguous.
 
static const int MODE_OBJ = 0x1000
 Set for non-executable object modules.
 
static const int MODE_SIZE = 0x2000
 Set if address/offset fields are 32-bit wide instead of 16-bit.
 
static const int MODE_PAGE_RELOC = 0x4000
 Set if file is page relocatable (256 bytes) instead of byte relocatable.
 
static const int MODE_65816 = 0x8000
 Set for 65816 mode.
 

Friends

class O65Format
 

Detailed Description

A object file typically contains a single module.


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