writeStruct
fn
ubyte[] writeStruct(T)(T value, ElfEndian fileEndian)Write a packed struct to a byte array.
This template function writes a packed struct to a new byte array. Since ELF structs are packed with align(1), this function performs a direct byte copy. Fields requiring endianness conversion should be set before calling this function.
Parameters
value | The struct to write. |
fileEndian | The endianness to use for the output (reserved for future use). |
Returns
A byte array containing the struct.