Dynamically load an ELF binary from a path on the filesystem.
Defined in <mojoelf.h>
void * MOJOELF_dlopen_file(const char *fname, const MOJOELF_Callbacks *cb);| const char * | fname | the path to the file to load on the filesystem. |
| const MOJOELF_Callbacks * | cb | callbacks that manage how the ELF loader operates. May be NULL, and any function pointer in the struct may also individually be NULL. |
(void *) Returns a non-NULL pointer on success, NULL on failure. On failure, a human-readable error message may be obtained by calling MOJOELF_dlerror().
This is a convenience function that allocates a temporary memory
buffer, loads fname into it, calls MOJOELF_dlopen_mem(), and then frees the
temporary buffer.
All the same information in that function's documentation applies here.
this function is not thread-safe.
This function is available since MojoELF 1.0.0.