diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-05-09 21:59:32 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-05-09 21:59:32 +0200 |
| commit | d38f659f428544de524fe6f2a49355a104055555 (patch) | |
| tree | c26f2d251706919f7496b8fe6d857acd75a6b888 /src/elfs | |
| parent | 6d95a644123181addb647f51712ad3e5782d5052 (diff) | |
| download | box64-d38f659f428544de524fe6f2a49355a104055555.tar.gz box64-d38f659f428544de524fe6f2a49355a104055555.zip | |
Changed the workaround for MiniMetro/Steam, using rcfile now (for #1311)
Diffstat (limited to 'src/elfs')
| -rw-r--r-- | src/elfs/elfloader.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c index 1afda4be..efb0ef57 100644 --- a/src/elfs/elfloader.c +++ b/src/elfs/elfloader.c @@ -928,7 +928,7 @@ void AddSymbols(lib_t *maplib, elfheader_t* h) checkHookedSymbols(h); #endif } - +extern path_collection_t box64_addlibs; /* $ORIGIN – Provides the directory the object was loaded from. This token is typical used for locating dependencies in unbundled packages. For more details of this @@ -1021,7 +1021,12 @@ int LoadNeededLibs(elfheader_t* h, lib_t *maplib, int local, int bindnow, int de for (size_t i=0; i<h->numDynamic; ++i) if(h->Dynamic[i].d_tag==DT_NEEDED) h->needed->names[j++] = h->DynStrTab+h->delta+h->Dynamic[i].d_un.d_val; - + if(h==my_context->elfs[0] && box64_addlibs.size) { + for(int i=0; i<box64_addlibs.size; ++i) { + printf_log(LOG_INFO, "BOX64, Adding %s to needed libs of %s\n", box64_addlibs.paths[i], h->name); + add1lib_neededlib_name(h->needed, NULL, box64_addlibs.paths[i]); + } + } // TODO: Add LD_LIBRARY_PATH and RPATH handling if(AddNeededLib(maplib, local, bindnow, deepbind, h->needed, h, box64, emu)) { printf_log(LOG_INFO, "Error loading one of needed lib\n"); |