Class RelocationBlock
- Namespace
- AsmResolver.PE.Relocations.Builder
- Assembly
- AsmResolver.PE.dll
Represents one block of relocations to be applied when the PE is loaded into memory.
public sealed class RelocationBlock : SegmentBase, ISegment, IOffsetProvider, IWritable
- Inheritance
-
RelocationBlock
- Implements
- Inherited Members
Constructors
RelocationBlock(uint)
Creates a new base relocation block for the provided page.
public RelocationBlock(uint pageRva)
Parameters
pageRvauintThe virtual address of the page to apply base relocations on.
Properties
Entries
Gets the list of entries added to this page.
public IList<RelocationEntry> Entries { get; }
Property Value
PageRva
Gets or sets the base RVA for this page.
public uint PageRva { get; }
Property Value
Methods
Add(RelocationEntry, bool)
Adds a relocation entry to the block.
public bool Add(RelocationEntry entry, bool allowDuplicates = false)
Parameters
entryRelocationEntryThe entry to add.
allowDuplicatesbooltrueif the entry should be ignored if it already exists,falseotherwise.
Returns
- bool
trueif the entry was added,falseotherwise.
GetPhysicalSize()
Computes the number of bytes that the structure contains.
public override uint GetPhysicalSize()
Returns
- uint
The number of bytes.
Write(BinaryStreamWriter)
Serializes the structure to an output stream.
public override void Write(BinaryStreamWriter writer)
Parameters
writerBinaryStreamWriterThe output stream to write the data to.