Program initialization
The new init_stack_program_start
function allows easily setting up the stack as it is on Linux. This makes it even easier to run ELF binaries
See the example in the README for full details:
let ax = Axecutor.from_binary(/* elf file content as Uint8Array */);
// Set up the stack according to the System V ABI.
// This sets up memory locations for command-line arguments and environment variables
// and writes the stack pointer to RSP
ax.init_stack_program_start(
8n * 1024n, // Stack size
["/bin/my_binary", "arg1", "arg2"],
[ /* environment variables */ ]
);
Support for programs using libc is still in progress, but has gotten slightly better (still not working).
Full Changelog: v0.2.1...v0.3.0