decodeFileHeader
fn
FileHeader decodeFileHeader(const(ubyte)[] data, size_t offset, ElfClass cls,
ElfEndian endian)Decode a file header from raw ELF file bytes.
The on-disk layout (ELF32 or ELF64) is selected by cls, and every multi-byte field is converted from endian to the host byte order before the result is built.
Parameters
data | Raw ELF file bytes. |
offset | Offset of the header within data. |
cls | ELF class of the file (selects the wire layout). |
endian | Byte order used by the file. |
Returns
The decoded generic file header.
Throws
Exception if the header does not fit in
data.