Table of Contents

Class SegmentBase

Namespace
AsmResolver
Assembly
AsmResolver.dll

Provides a base for a segment in a file that can be relocated.

public abstract class SegmentBase : ISegment, IOffsetProvider, IWritable
Inheritance
SegmentBase
Implements
Derived
Inherited Members
Extension Methods

Properties

CanUpdateOffsets

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

public bool CanUpdateOffsets { get; }

Property Value

bool

Offset

Gets the physical starting offset of the segment.

public ulong Offset { get; protected set; }

Property Value

ulong

Rva

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

public uint Rva { get; protected set; }

Property Value

uint

Methods

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public abstract 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 virtual 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 abstract void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.