Module

A higher level wrapper over OS level modules/shared libraries.

The module is lazy-loading, meaning segment and symbol lists will only be enumerated when requested; this in turn means modules can be relatively lightweight.

Constructors

this
this(string path)

Loads a module from a path into this application's address space, without doing any path transformations.

Destructor

~this
~this()

Destructor

Members

Functions

createSymbolListFor
weak_vector!Symbol createSymbolListFor(SectionInfo section)

Lists all symbols within the given section.

findSection
SectionInfo* findSection(string section, string segment)

Finds a section within the module, and optionally limits the search to be within a specific segment, if applicable.

getSymbol
void* getSymbol(string sym)

Gets a symbol from the module.

getSymbolSection
SectionInfo* getSymbolSection(void* sym)

Gets the section which a symbol belongs to.

Properties

baseAddress
void* baseAddress [@property getter]

The base address the module is loaded into.

sections
SectionInfo[] sections [@property getter]

List of all sections in the module.

self
Module self [@property getter]

Gets the calling module.

symbols
Symbol[] symbols [@property getter]

List of all exported symbols in the module.

Static functions

load
Module load(string pathOrName)

Loads a module from the given path.

Meta