about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-03 16:48:56 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-03 16:48:56 +0100
commit745a68f556537aaaaa8ee25a76b5757d3d3f7494 (patch)
tree0776664dcd006557c3d5e3d90496678ff02ef6db /src
parent5fe45a93414b32883ed9d34e25272e764219b2d1 (diff)
downloadbox64-745a68f556537aaaaa8ee25a76b5757d3d3f7494.tar.gz
box64-745a68f556537aaaaa8ee25a76b5757d3d3f7494.zip
Preload libs if needed
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index dd45c716..17b94f9b 100755
--- a/src/main.c
+++ b/src/main.c
@@ -849,6 +849,15 @@ int main(int argc, const char **argv, const char **env) {
         dynarec_wine_prereserve();
         #endif
     }
+    // pre-load lib if needed
+    if(ld_preload.size) {
+        for (int i=0; i<ld_preload.size; ++i) {
+            if(AddNeededLib(NULL, NULL, 0, ld_preload.paths[i], my_context, emu)) {
+                printf_log(LOG_INFO, "Warning, cannot pre-load lib: \"%s\"\n", ld_preload.paths[i]);
+            }            
+        }
+    }
+    FreeCollection(&ld_preload);
 
     return 0;
 }