#include <oskit/exec/exec.h>int exec_load_elf(exec_read_func_t *read, exec_read_exec_func_t *read_exec, void *handle, [out] exec_info_t *info);
This function recognizes, interprets, and loads executables in the ELF (Executable and Linkable File) format.
- read
- Specifies the metadata reader callback function, as described in Section 23.2.1.
- read_exec
- Specifies the executable data reader callback function, as described in Section 23.2.2.
- handle
- An opaque pointer value which the executable interpreter simply passes through to the callback functions.
- info
- A pointer to an exec_info structure which the executable interpreter will fill with information about the loaded executable.
Returns 0 on success, or an error code on failure. The error code may be either one of the EX_ error codes defined in exec.h, or it may be a caller-defined error code returned by one of the callback functions and passed through to the client.