Table of Contents

Struct BaseRelocation

Namespace
AsmResolver.PE.Relocations
Assembly
AsmResolver.PE.dll

Represents a single base relocation that is applied after the operating system has loaded the PE image into memory.

public readonly struct BaseRelocation
Inherited Members

Constructors

BaseRelocation(RelocationType, ISegmentReference)

Creates a new base relocation.

public BaseRelocation(RelocationType type, ISegmentReference location)

Parameters

type RelocationType

The type of base relocation to apply.

location ISegmentReference

The location within the executable to apply the base relocation.

Properties

Location

Gets the location within the executable to apply the relocation to.

public ISegmentReference Location { get; }

Property Value

ISegmentReference

Type

Gets the type of relocation to apply.

public RelocationType Type { get; }

Property Value

RelocationType

Methods

Equals(BaseRelocation)

Determines whether two base relocations are considered equal.

public bool Equals(BaseRelocation other)

Parameters

other BaseRelocation

The other base relocation.

Returns

bool

true if the base relocations are equal, false otherwise.

Remarks

This method only considers the virtual address (RVA) of the target location, and not the entire ISegmentReference member.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.