Struct RelocationEntry
- Namespace
- AsmResolver.PE.Relocations.Builder
- Assembly
- AsmResolver.PE.dll
Represents one entry in a base relocation block, containing the offset within the page, as well as the type of relocation to apply after the PE image was loaded by the OS.
public readonly struct RelocationEntry : IWritable
- Implements
- Inherited Members
Constructors
RelocationEntry(RelocationType, int)
Creates a new relocation entry.
public RelocationEntry(RelocationType type, int offset)
Parameters
type
RelocationTypeThe type of relocation to apply.
offset
intThe offset within the page to apply the relocation on.
Exceptions
- ArgumentOutOfRangeException
Occurs when the offset does not indicate a valid offset within the page.
RelocationEntry(ushort)
Creates a new relocation entry.
public RelocationEntry(ushort value)
Parameters
value
ushortThe raw value of the entry.
Properties
IsEmpty
Gets a value indicating the entry is a zero entry.
public bool IsEmpty { get; }
Property Value
Offset
Gets the offset (relative to the current relocation block) to the pointer to relocate.
public int Offset { get; }
Property Value
RelocationType
Gets the type of the relocation to apply.
public RelocationType RelocationType { get; }
Property Value
Methods
GetPhysicalSize()
Computes the number of bytes that the structure contains.
public uint GetPhysicalSize()
Returns
- uint
The number of bytes.
Write(BinaryStreamWriter)
Serializes the structure to an output stream.
public void Write(BinaryStreamWriter writer)
Parameters
writer
BinaryStreamWriterThe output stream to write the data to.