From a2a78a4edc2e82756d83daf8bbbe2ca26102af47 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 1 Mar 2021 18:02:26 +0100 Subject: Load elf in memory --- src/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index c049a27d..1e513351 100755 --- a/src/main.c +++ b/src/main.c @@ -750,6 +750,17 @@ int main(int argc, const char **argv, const char **env) { FreeCollection(&ld_preload); return -1; } + // Load elf into memory + if(LoadElfMemory(f, my_context, elf_header)) { + printf_log(LOG_NONE, "Error: loading in memory elf %s\n", my_context->argv[0]); + fclose(f); + free_contextargv(); + FreeBox64Context(&my_context); + FreeCollection(&ld_preload); + return -1; + } + // can close the file now + fclose(f); return 0; -- cgit 1.4.1