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

Represents a base relocation, as stored in the image. More...

#include <peexe.h>

Public Types

enum  relocation_type {
  RelAbsolute = 0 , RelHigh = 1 , RelLow = 2 , RelHighLow = 3 ,
  RelHighAdj = 4 , RelMIPSJmpAddr = 5 , RelARMMov32 = 5 , RelRISCVHigh20 = 5 ,
  RelThumbMov32 = 7 , RelRISCVLow12I = 7 , RelRISCVLow12S = 8 , RelLoongArch32MarkLA = 8 ,
  RelLoongArch64MarkLA = 8 , RelMIPSJmpAddr16 = 9 , RelDir64 = 10
}
 The type of the relocation, partly dependent on the current CPU. More...
 

Public Member Functions

size_t GetEntryCount (const PEFormat *format) const
 The number of base relocation entries required to store this base relocation, typically 1.
 
size_t GetRelocationSize (const PEFormat *format) const
 The number of bytes impacted by this relocation (typically 2 or 4 or 8)
 

Public Attributes

relocation_type type
 The type of the relocation, stored as the 4 most significant bits of a 16-bit base relocation entry.
 
uint16_t offset
 The offset of the relocation within the page corresponding to this base relocation block, stored as the 12 least significant bits of a 16-bit base relocation entry.
 
uint16_t parameter = 0
 For relocation type HighAdj, the 16-bit value stored in the following base relocation entry.
 

Detailed Description

Represents a base relocation, as stored in the image.

Member Enumeration Documentation

◆ relocation_type

The type of the relocation, partly dependent on the current CPU.

Enumerator
RelAbsolute 

No relocation.

RelHigh 

The most significant 16 bits of the address.

RelLow 

The least significant 16 bits of the address.

RelHighLow 

A full 32-bit address.

RelHighAdj 

The most significant 16 bits of the address, with the currently assumed least significant 16 bits stored in the next relocation entry in the base relocation table.

RelMIPSJmpAddr 

MIPS specific.

RelARMMov32 

ARM specific.

RelRISCVHigh20 

RISC-V specific.

RelThumbMov32 

Thumb (ARM) specific.

RelRISCVLow12I 

RISC-V specific.

RelRISCVLow12S 

RISC-V specific.

RelLoongArch32MarkLA 

LoongArch specific.

RelLoongArch64MarkLA 

LoongArch specific.

RelMIPSJmpAddr16 

MIPS specific.

RelDir64 

A full 64-bit address.


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