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

Represents a relocation record associated to this page. More...

#include <leexe.h>

Classes

struct  Chain
 A source location entry in the relocation record. More...
 
struct  ChainLink
 For chained relocations, this contains an element of the relocation chain. More...
 

Public Types

enum  source_type {
  Offset8 = 0 , Selector16 = 2 , Pointer32 = 3 , Offset16 = 5 ,
  Pointer48 = 6 , Offset32 = 7 , Relative32 = 8 , SourceTypeMask = 0x0F ,
  Alias = 0x10 , SourceList = 0x20
}
 
enum  flag_type {
  Internal = 0 , ImportOrdinal = 1 , ImportName = 2 , Entry = 3 ,
  FlagTypeMask = 3 , Additive = 4 , Chained = 8 , Target32 = 0x10 ,
  Additive32 = 0x20 , Module16 = 0x40 , Ordinal8 = 0x80
}
 

Public Member Functions

 Relocation (unsigned type, unsigned flags, uint16_t offset, uint16_t module, uint32_t target=0, uint32_t addition=0)
 
bool IsExternal () const
 
bool IsSelectorOrOffset () const
 
bool ComesBefore () const
 
size_t GetSourceSize () const
 
void DecrementSingleSourceOffset (size_t amount)
 
bool IsSelector () const
 
bool IsSourceList () const
 
bool IsAdditive () const
 
size_t GetTargetSize () const
 
size_t GetAdditiveSize () const
 
size_t GetModuleSize () const
 
size_t GetOrdinalSize () const
 
uint16_t GetFirstSource () const
 
void CalculateSizes (compatibility_type compatibility)
 
size_t GetSize () const
 
void WriteFile (const std::shared_ptr< Linker::Writer > &wr) const
 

Static Public Member Functions

static source_type GetType (Linker::Relocation &rel)
 
static Relocation ReadFile (const std::shared_ptr< Linker::Reader > &rd, Page &page)
 

Public Attributes

source_type type = source_type(0)
 
flag_type flags = flag_type(0)
 
 uint16_t
 
uint32_t target = 0
 
uint32_t addition = 0
 
std::string module_name
 Convenience field that stores the module name, not used for generation.
 
std::string import_name
 Convenience field that stores the imported procedure name, if imported by name, also the name for an exported entry, not used for generation.
 
uint16_t actual_object = 0
 Convenience field that stores the actual object number for an entry, not used for generation.
 
uint32_t actual_offset = 0
 Convenience field that stores the actual offset for an entry, not used for generation.
 
std::vector< Chain > sources
 The sequence of sources corresponding to the same relocation record.
 

Detailed Description

Represents a relocation record associated to this page.


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