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

Represents an EQU or GEQU record. More...

#include <gsos.h>

Inheritance diagram for Apple::OMFFormat::Segment::LabelExpressionRecord:
Apple::OMFFormat::Segment::LabelRecord Apple::OMFFormat::Segment::Record

Public Member Functions

 LabelExpressionRecord (record_type type)
 
 LabelExpressionRecord (record_type type, std::string name, uint16_t line_length, int operation, uint16_t private_flag, std::unique_ptr< Expression > expression)
 
offset_t GetLength (const Segment &segment) const override
 Returns the size of the record, as stored in the file.
 
void ReadFile (Segment &segment, Linker::Reader &rd) override
 
void WriteFile (const Segment &segment, Linker::Writer &wr) const override
 
void AddFields (Dumper::Dumper &dump, Dumper::Region &region, const OMFFormat &omf, const Segment &segment, unsigned index, offset_t file_offset, offset_t address) const override
 Adds any further fields to the file region that encompasses this record.
 
- Public Member Functions inherited from Apple::OMFFormat::Segment::LabelRecord
 LabelRecord (record_type type)
 
 LabelRecord (record_type type, std::string name, uint16_t line_length, int operation, uint16_t private_flag)
 
offset_t GetLength (const Segment &segment) const override
 Returns the size of the record, as stored in the file.
 
void ReadFile (Segment &segment, Linker::Reader &rd) override
 
void WriteFile (const Segment &segment, Linker::Writer &wr) const override
 
void AddFields (Dumper::Dumper &dump, Dumper::Region &region, const OMFFormat &omf, const Segment &segment, unsigned index, offset_t file_offset, offset_t address) const override
 Adds any further fields to the file region that encompasses this record.
 
- Public Member Functions inherited from Apple::OMFFormat::Segment::Record
 Record (record_type type)
 
virtual offset_t GetMemoryLength (const Segment &segment, offset_t current_address) const
 Returns the amount of memory the record occupies when loaded into memory. Most records have a length of 0.
 
virtual void Dump (Dumper::Dumper &dump, const OMFFormat &omf, const Segment &segment, unsigned index, offset_t file_offset, offset_t address) const
 Displays information pertaining to this record.
 
virtual void AddSignals (Dumper::Block &block, offset_t current_segment_offset) const
 If this is a relocation record, add the relocation signals to the block.
 
virtual void ReadData (size_t bytes, offset_t offset, void *buffer) const
 Attempts to read data from the in-memory image, if possible, it can be assumed that offset + bytes <= GetMemoryLength()
 

Public Attributes

std::unique_ptr< Expressionexpression
 
- Public Attributes inherited from Apple::OMFFormat::Segment::LabelRecord
std::string name
 
uint16_t line_length = 0
 
operation_type operation = operation_type(0)
 
uint16_t private_flag = 0
 
- Public Attributes inherited from Apple::OMFFormat::Segment::Record
record_type type
 

Additional Inherited Members

- Public Types inherited from Apple::OMFFormat::Segment::LabelRecord
enum  operation_type {
  OP_ADDRESS_DC = 'A' , OP_BOOL_DC = 'B' , OP_CHAR_DC = 'C' , OP_DOUBLE_DC = 'D' ,
  OP_FLOAT_DC = 'E' , OP_EQU_GEQU = 'G' , OP_HEX_DC = 'H' , OP_INT_DC = 'I' ,
  OP_REF_ADDRESS_DC = 'K' , OP_SOFT_REF_DC = 'L' , OP_INSTRUCTION = 'M' , OP_ASM_DIRECTIVE = 'N' ,
  OP_ORG = 'O' , OP_ALIGN = 'P' , OP_DS = 'S' , OP_ARITHMETIC_SYMBOL = 'X' ,
  OP_BOOL_SYMBOL = 'Y' , OP_CHAR_SYMBOL = 'Z'
}
 
- Public Types inherited from Apple::OMFFormat::Segment::Record
enum  record_type {
  OPC_END = 0x00 , OPC_CONST_BASE = 0x00 , OPC_CONST_FIRST = 0x01 , OPC_CONST_LAST = 0xDF ,
  OPC_ALIGN = 0xE0 , OPC_ORG = 0xE1 , OPC_RELOC = 0xE2 , OPC_INTERSEG = 0xE3 ,
  OPC_USING = 0xE4 , OPC_STRONG = 0xE5 , OPC_GLOBAL = 0xE6 , OPC_GEQU = 0xE7 ,
  OPC_MEM = 0xE8 , OPC_EXPR = 0xEB , OPC_ZEXPR = 0xEC , OPC_BEXPR = 0xED ,
  OPC_RELEXPR = 0xEE , OPC_LOCAL = 0xEF , OPC_EQU = 0xF0 , OPC_DS = 0xF1 ,
  OPC_LCONST = 0xF2 , OPC_LEXPR = 0xF3 , OPC_ENTRY = 0xF4 , OPC_C_RELOC = 0xF5 ,
  OPC_C_INTERSEG = 0xF6 , OPC_SUPER = 0xF7
}
 

Detailed Description

Represents an EQU or GEQU record.

Member Function Documentation

◆ AddFields()

void OMFFormat::Segment::LabelExpressionRecord::AddFields ( Dumper::Dumper & dump,
Dumper::Region & region,
const OMFFormat & omf,
const Segment & segment,
unsigned index,
offset_t file_offset,
offset_t address ) const
overridevirtual

Adds any further fields to the file region that encompasses this record.

Reimplemented from Apple::OMFFormat::Segment::Record.

◆ GetLength()

offset_t OMFFormat::Segment::LabelExpressionRecord::GetLength ( const Segment & segment) const
overridevirtual

Returns the size of the record, as stored in the file.

Parameters
segmentThe segment the record is part of

Reimplemented from Apple::OMFFormat::Segment::Record.

◆ ReadFile()

void OMFFormat::Segment::LabelExpressionRecord::ReadFile ( Segment & segment,
Linker::Reader & rd )
overridevirtual

Reimplemented from Apple::OMFFormat::Segment::Record.

◆ WriteFile()

void OMFFormat::Segment::LabelExpressionRecord::WriteFile ( const Segment & segment,
Linker::Writer & wr ) const
overridevirtual

Reimplemented from Apple::OMFFormat::Segment::Record.


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