Struct RelocationParameters
- Namespace
- AsmResolver
- Assembly
- AsmResolver.dll
Provides parameters for relocating a segment to a new offset-rva pair.
public struct RelocationParameters
- Inherited Members
Constructors
RelocationParameters(ulong, uint)
Creates new relocation parameters.
public RelocationParameters(ulong offset, uint rva)
Parameters
offset
ulongThe new offset of the segment.
rva
uintThe new virtual address of the segment, relative to the image base.
RelocationParameters(ulong, ulong, uint, bool)
Creates new relocation parameters.
public RelocationParameters(ulong imageBase, ulong offset, uint rva, bool is32Bit)
Parameters
imageBase
ulongThe base address of the image the segment is located in.
offset
ulongThe new offset of the segment.
rva
uintThe new virtual address of the segment, relative to the image base.
is32Bit
booltrue
if the image is targeting 32-bit images,false
for 64-bit images.
Properties
ImageBase
Gets the image base that is assumed when relocating the segment.
public readonly ulong ImageBase { get; }
Property Value
Is32Bit
Gets a value indicating whether the image is targeting 32-bit machines.
public readonly bool Is32Bit { get; }
Property Value
Is64Bit
Gets a value indicating whether the image is targeting 64-bit machines.
public bool Is64Bit { get; }
Property Value
Offset
Gets the new physical offset of the segment.
public ulong Offset { readonly get; set; }
Property Value
Rva
Gets the new virtual address of the segment, relative to the image base.
public uint Rva { readonly get; set; }
Property Value
Methods
Advance(uint)
Advances the current offset and virtual address by the provided byte count.
public void Advance(uint count)
Parameters
count
uintThe number of bytes to advance with.
Advance(uint, uint)
Advances the current offset and virtual address by the provided byte count.
public void Advance(uint physicalCount, uint virtualCount)
Parameters
physicalCount
uintThe number of bytes to advance the physical offset with.
virtualCount
uintThe number of bytes to advance the virtual address with.
Align(uint)
Aligns the current offset and virtual address to the nearest multiple of the provided alignment.
public void Align(uint alignment)
Parameters
alignment
uintThe alignment.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
WithAdvance(uint)
Advances the current offset and virtual address by the provided byte count.
public readonly RelocationParameters WithAdvance(uint count)
Parameters
count
uintThe number of bytes to advance with.
Returns
- RelocationParameters
The new relocation parameters.
WithOffsetRva(ulong, uint)
Copies the current relocation parameters, and assigns a new offset and relative virtual address.
public RelocationParameters WithOffsetRva(ulong offset, uint rva)