英語版
このページの英語版を見る

core.internal.elf.dl

現在のプロセスで共有されているELFオブジェクトでの作業を簡素化する。
Authors:
Martin Kinkelin
struct SharedObjects;
プロセスの現在ロードされている共有オブジェクトを反復処理できるようにする。
alias Callback = int delegate(SharedObject) nothrow @nogc;
static nothrow @nogc int opApply(scope Callback dg);
struct SharedObject;
ロードされた共有ELFオブジェクト/バイナリ、すなわち実行可能ファイルまたは共有ライブラリ。
static nothrow @nogc SharedObject thisExecutable();
現在のプロセスの実行可能ファイルを返す。
static nothrow @nogc bool findForAddress(scope const void* address, out SharedObject result);
指定されたアドレスを含む共有オブジェクトを、そのセグメントの 1 つで見つけようとする。
Returns:
成功すると真を返す。
dl_phdr_info info;
OS 依存の info 構造体。
const nothrow @nogc @property void* baseAddress();
オブジェクトのベースアドレスを返す。
const nothrow @nogc const(char)[] name();
オブジェクトの名前(通常はパス)を返す。ヌル終端。
const char[] getPath(size_t N)(ref char[N] buffer)
if (N > 1);
ELFファイルへのパスで指定されたバッファを埋めようとする、 proc//mapsファイルに従って。
Returns:
充填されたスライス(ヌル終端)、またはエラーが発生した場合はヌル。
const nothrow @nogc int opApply(scope int delegate(const ref Elf_Phdr) nothrow @nogc dg);
このオブジェクトのセグメントを繰り返し処理する。
const nothrow @nogc bool findSegmentForAddress(scope const void* address, out const(Elf_Phdr)* result);
指定されたアドレスを含むセグメントを探そうとする。
Returns:
成功すると true を返す。