diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-07-09 12:38:48 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-07-09 12:38:48 +0200 |
| commit | dabbca767f9de4fc4cf68252037de3061592eae2 (patch) | |
| tree | bfc1dadad814a82a155c0c374097177b94154beb /src/main.c | |
| parent | ca9bc1361943575724eb5152798aa208ed5eed6c (diff) | |
| download | box64-dabbca767f9de4fc4cf68252037de3061592eae2.tar.gz box64-dabbca767f9de4fc4cf68252037de3061592eae2.zip | |
[ELFLOADER] Added a check if lib version is compatible with what the elf loading it wants (helps Linux games on Steam)
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index e06cd2ad..00218c3d 100755 --- a/src/main.c +++ b/src/main.c @@ -917,7 +917,7 @@ int GatherEnv(char*** dest, char** env, char* prog) (*dest)[idx++] = box_strdup("BOX64_PATH=.:bin"); } if(!ld_path) { - (*dest)[idx++] = box_strdup("BOX64_LD_LIBRARY_PATH=.:lib:lib64"); + (*dest)[idx++] = box_strdup("BOX64_LD_LIBRARY_PATH=.:lib:lib64:x86_64:bin64:libs64"); } // add "_=prog" at the end... if(prog) { @@ -1045,6 +1045,7 @@ void LoadEnvVars(box64context_t *context) AddPath("libcrypto.so.1", &context->box64_emulated_libs, 0); AddPath("libcrypto.so.1.0.0", &context->box64_emulated_libs, 0); AddPath("libunwind.so.8", &context->box64_emulated_libs, 0); + AddPath("libpng12.so.0", &context->box64_emulated_libs, 0); if(getenv("BOX64_SSE_FLUSHTO0")) { if (strcmp(getenv("BOX64_SSE_FLUSHTO0"), "1")==0) { @@ -1744,7 +1745,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, my_context, emu)) { + if(AddNeededLib(my_context->maplib, 0, 0, tmp, elf_header, my_context, emu)) { printf_log(LOG_INFO, "Warning, cannot pre-load of %s\n", tmp->names[0]); RemoveNeededLib(my_context->maplib, 0, tmp, my_context, emu); } else { |