ElfFile.this

this() @disable

Default constructor - creates an empty ElfFile.

this(const(ubyte)[] data)

Constructor from a byte array (const view).

Parameters

dataByte array containing ELF file data.
this(ubyte[] data)

Constructor from a mutable byte array.

The file keeps a view of the data; the memory itself is managed by the garbage collector, so no ownership bookkeeping is needed.

Parameters

dataByte array containing ELF file data.
this(string path)

Constructor from file path.

Reads the entire file into memory.

Parameters

pathPath to the ELF file.

Throws

Exception if the file cannot be read in full.
this(File file)

Constructor from std.stdio.File.

Reads from the current position of the file to its end. When the position is zero, the whole file is read.

Parameters

fileFile object to read from.

Throws

Exception if the file cannot be read.