about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-02-11 16:46:21 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-02-11 16:46:21 +0100
commitc70581abc9380ab57deba3f8076e26191b5c2755 (patch)
tree267e6630695ffc7b618d58e0cb01117bd9975abc /src/main.c
parent5e6af3753292b8da43d4fbee186a78f3e5068141 (diff)
downloadbox64-c70581abc9380ab57deba3f8076e26191b5c2755.tar.gz
box64-c70581abc9380ab57deba3f8076e26191b5c2755.zip
Added support for RTLD_DEEPBIND flag on dlopen
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 7c4f806b..7c74bc5a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2002,7 +2002,7 @@ int main(int argc, const char **argv, char **env) {
         for(int i=0; i<ld_preload.size; ++i) {
             needed_libs_t* tmp = new_neededlib(1);
             tmp->names[0] = ld_preload.paths[i];
-            if(AddNeededLib(my_context->maplib, 0, 0, tmp, elf_header, my_context, emu)) {
+            if(AddNeededLib(my_context->maplib, 0, 0, 0, tmp, elf_header, my_context, emu)) {
                 printf_log(LOG_INFO, "Warning, cannot pre-load %s\n", tmp->names[0]);
                 RemoveNeededLib(my_context->maplib, 0, tmp, my_context, emu);
             } else {
@@ -2014,20 +2014,20 @@ int main(int argc, const char **argv, char **env) {
     }
     FreeCollection(&ld_preload);
     // Call librarian to load all dependant elf
-    if(LoadNeededLibs(elf_header, my_context->maplib, 0, 0, my_context, emu)) {
+    if(LoadNeededLibs(elf_header, my_context->maplib, 0, 0, 0, my_context, emu)) {
         printf_log(LOG_NONE, "Error: Loading needed libs in elf %s\n", my_context->argv[0]);
         FreeBox64Context(&my_context);
         return -1;
     }
     // reloc...
     printf_log(LOG_DEBUG, "And now export symbols / relocation for %s...\n", ElfName(elf_header));
-    if(RelocateElf(my_context->maplib, NULL, 0, elf_header)) {
+    if(RelocateElf(my_context->maplib, NULL, 0, 0, elf_header)) {
         printf_log(LOG_NONE, "Error: Relocating symbols in elf %s\n", my_context->argv[0]);
         FreeBox64Context(&my_context);
         return -1;
     }
     // and handle PLT
-    RelocateElfPlt(my_context->maplib, NULL, 0, elf_header);
+    RelocateElfPlt(my_context->maplib, NULL, 0, 0, elf_header);
     // deferred init
     setupTraceInit();
     RunDeferredElfInit(emu);