StandardHeader

data class StandardHeader(val magic: PE32Magic, val majorLinkerVersion: Byte, val minorLinkerVersion: Byte, val sizeOfCode: UInt, val sizeOfInitializedData: UInt, val sizeOfUninitializedData: UInt, val addressOfEntryPoint: Address32, val baseOfCode: Address32, val baseOfData: Address32) : ReadableStructure(source)

Represents the Standard (Optional) Header structure.

Constructors

Link copied to clipboard
constructor(magic: PE32Magic, majorLinkerVersion: Byte, minorLinkerVersion: Byte, sizeOfCode: UInt, sizeOfInitializedData: UInt, sizeOfUninitializedData: UInt, addressOfEntryPoint: Address32, baseOfCode: Address32, baseOfData: Address32)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The address of the entry point relative to the image base when the executable file is loaded into memory. For program images, this is the starting address. For device drivers, this is the address of the initialization function. An entry point is optional for DLLs. When no entry point is present, this field must be zero.

Link copied to clipboard

The address that is relative to the image base of the beginning-of-code section when it is loaded into memory.

Link copied to clipboard

The address that is relative to the image base of the beginning-of-data section when it is loaded into memory. This field is only present in PE32 format, and is absent in PE32+.

Link copied to clipboard
open override val fields: Map<String, Any>
Link copied to clipboard

The unsigned integer that identifies the state of the image file. The most common number is 0x10B, which identifies it as a normal executable file. 0x107 identifies it as a ROM image, and 0x20B identifies it as a PE32+ executable.

Link copied to clipboard

The linker major version number.

Link copied to clipboard

The linker minor version number.

Link copied to clipboard

The size of the code (text) section, or the sum of all code sections if there are multiple sections.

Link copied to clipboard

The size of the initialized data section, or the sum of all such sections if there are multiple data sections.

Link copied to clipboard

The size of the uninitialized data section (BSS), or the sum of all such sections if there are multiple BSS sections.

Functions

Link copied to clipboard
fun length(): Int