decodeProgramHeader
fn
ProgramHeader decodeProgramHeader(const(ubyte)[] data, size_t offset,
ElfClass cls, ElfEndian endian)Decode a program header from raw ELF file bytes.
Note that the field order differs between the ELF32 and ELF64 wire layouts (p_flags immediately follows p_type only in ELF64).
Parameters
data | Raw ELF file bytes. |
offset | Offset of the program header within data. |
cls | ELF class of the file (selects the wire layout). |
endian | Byte order used by the file. |
Returns
The decoded generic program header.
Throws
Exception if the header does not fit in
data.