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
Linker::Position Class Reference

Stores an absolute address along with the containing segment or address space. More...

#include <position.h>

Public Member Functions

 Position (offset_t address=0, std::shared_ptr< Segment > segment=nullptr)
 
offset_t GetSegmentOffset () const
 Returns the offset from the start of the segment.
 
Positionoperator+= (offset_t value)
 Arithmetic on the address.
 
Positionoperator-= (offset_t value)
 Arithmetic on the address.
 

Public Attributes

offset_t address
 The address of the position, independent of segment it belongs to.
 
std::shared_ptr< Segmentsegment
 The segment or address space of the position.
 

Detailed Description

Stores an absolute address along with the containing segment or address space.

When linking in large models, it is important to track if symbols belong to different segments/address spaces, so that a corresponding relocation can be generated for them. This class makes it easier to check whether the target and reference frame of a relocation is in the same address space.


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