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

Public Types

enum  source_type {
  Offset8 = 0 , Selector16 = 2 , Pointer32 = 3 , Offset16 = 5 ,
  Pointer48 = 11 , Offset32 = 13
}
 The type of the field that needs to be updated in the binary image. More...
 
enum  flag_type {
  TargetTypeMask = 3 , Internal = 0 , ImportOrdinal = 1 , ImportName = 2 ,
  OSFixup = 3 , Additive = 4
}
 Encodes what the type of the target is for this relocation. More...
 
enum  {
  FIARQQ = 1 , FJARQQ = 1 , FISRQQ = 2 , FJSRQQ = 2 ,
  FICRQQ = 3 , FJCRQQ = 3 , FIERQQ = 4 , FIDRQQ = 5 ,
  FIWRQQ = 6
}
 

Public Member Functions

 Relocation (unsigned type, unsigned flags, uint16_t offset, uint16_t module, uint16_t target)
 
size_t GetSize () const
 

Static Public Member Functions

static source_type GetType (Linker::Relocation &rel)
 

Public Attributes

source_type type = source_type(0)
 The type of relocation.
 
flag_type flags = flag_type(0)
 The type of target.
 
std::vector< uint16_toffsets
 The offset to the relocation, or if the relocation is chained, a list of offsets (this is not possible for Offset8)
 
 uint16_t
 This field is a segment (1 based) or module (1 based) or 80x87 instruction reference, depending on the flags.
 
uint16_t target = 0
 This field is an offset or ordinal, depending on the flags.
 
std::string module_name
 Convenience field that stores the module name.
 
std::string import_name
 Convenience field that stores the imported procedure name, if imported by name, also the name for an exported entry.
 
uint8_t actual_segment = 0
 Convenience field that stores the actual segment for an entry.
 
uint16_t actual_offset = 0
 Convenience field that stores the actual offset for an entry.
 

Member Enumeration Documentation

◆ flag_type

Encodes what the type of the target is for this relocation.

Enumerator
TargetTypeMask 

Mask to get the type of the target.

Internal 

An internal segment:offset, or if segment is 0xFF, offset is the entry number.

ImportOrdinal 

An imported module:ordinal where module is the module number.

ImportName 

An imported module:offset where module is the module number and offset is an offset to the name.

OSFixup 

This is actually an 80x87 instruction sequence that needs to be fixed up for 80x87 emulation.

Additive 

Whether the relocation has an added in the image or it is the first element in a relocation chain.

               If set, the value stored in the image has to be added to the target value.
               If cleared, the value stored in the image is part of a relocation chain, providing the offset to the following relocation.
               The chain is closed if the value 0xFFFF is present.
               All other properties of the relocation are the same as the first member of the chain.

◆ source_type

The type of the field that needs to be updated in the binary image.

Enumerator
Offset8 

Lower 8 bits of value.

Selector16 

A 16-bit segment selector value (or paragraph in real mode)

Pointer32 

A 32-bit far pointer, 16-bit segment and 16-bit offset value.

Offset16 

A 16-bit offset within its preferred segment.

Pointer48 

A 48-bit far pointer, 16-bit segment and 32-bit offset value.

Offset32 

A 32-bit offset within its preferred segment.


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