Table of Contents

Class ReferenceTable

Namespace
AsmResolver.Collections
Assembly
AsmResolver.dll

Represents a table of references that can be written as one block of contiguous bytes.

public class ReferenceTable : Collection<ISegmentReference>, IList<ISegmentReference>, ICollection<ISegmentReference>, IReadOnlyList<ISegmentReference>, IReadOnlyCollection<ISegmentReference>, IEnumerable<ISegmentReference>, IList, ICollection, IEnumerable, ISegment, IOffsetProvider, IWritable
Inheritance
ReferenceTable
Implements
Inherited Members
Extension Methods

Constructors

ReferenceTable(ReferenceTableAttributes)

Creates a new reference table.

public ReferenceTable(ReferenceTableAttributes attributes)

Parameters

attributes ReferenceTableAttributes

The attributes describing the shape of the table.

Properties

Attributes

Gets the attributes describing the shape of the table.

public ReferenceTableAttributes Attributes { get; }

Property Value

ReferenceTableAttributes

CanUpdateOffsets

Determines whether this structure can be relocated to another offset or virtual address.

public bool CanUpdateOffsets { get; }

Property Value

bool

Is32BitTable

Gets a value indicating whether the size of a single reference in the table is 32 bits.

public bool Is32BitTable { get; }

Property Value

bool

Is64BitTable

Gets a value indicating whether the size of a single reference in the table is 64 bits.

public bool Is64BitTable { get; }

Property Value

bool

IsAdaptive

Gets a value indicating whether the size of a single reference changes depending on whether this table is put in a 32 or 64 bit application.

public bool IsAdaptive { get; }

Property Value

bool

IsOffsetTable

Gets a value indicating whether the table contains offsets.

public bool IsOffsetTable { get; }

Property Value

bool

IsRvaTable

Gets a value indicating whether the table contains RVAs.

public bool IsRvaTable { get; }

Property Value

bool

IsVaTable

Gets a value indicating whether the table contains VAs.

public bool IsVaTable { get; }

Property Value

bool

IsZeroTerminated

Gets a value indicating whether the table ends with a zero entry.

public bool IsZeroTerminated { get; }

Property Value

bool

Offset

Gets the physical starting offset of the segment.

public ulong Offset { get; }

Property Value

ulong

ReferenceSize

Gets the size in bytes that each reference occupies in the table.

public ReferenceTableAttributes ReferenceSize { get; }

Property Value

ReferenceTableAttributes

ReferenceType

Gets the type of reference that is stored in the table.

public ReferenceTableAttributes ReferenceType { get; }

Property Value

ReferenceTableAttributes

Rva

Gets the virtual address relative to the beginning of the section that the segment is located in.

public uint Rva { get; }

Property Value

uint

Methods

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public uint GetPhysicalSize()

Returns

uint

The number of bytes.

GetVirtualSize()

Computes the number of bytes the segment will contain when it is mapped into memory.

public uint GetVirtualSize()

Returns

uint

The number of bytes.

UpdateOffsets(in RelocationParameters)

Assigns a new file and virtual offset to the segment and all its sub-components.

public void UpdateOffsets(in RelocationParameters parameters)

Parameters

parameters RelocationParameters

The parameters containing the new offset information for the segment.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.