diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-04-28 17:13:37 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-04-28 17:14:00 +0200 |
| commit | 14e20e643515d4e7171f54e6d2fb78cf784f7d10 (patch) | |
| tree | f4ebb79470ce3f172087346546b99d7c5e884108 /src/wrapped | |
| parent | 93abd016b451d63355dbc02fdbed431f6eacc810 (diff) | |
| download | box64-14e20e643515d4e7171f54e6d2fb78cf784f7d10.tar.gz box64-14e20e643515d4e7171f54e6d2fb78cf784f7d10.zip | |
Fix for local library open using dlopen that are then promoted to global with another dlopen (help java 17, probably other too)
Diffstat (limited to 'src/wrapped')
| -rwxr-xr-x | src/wrapped/wrappedlibdl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c index 9caaba56..350eb088 100755 --- a/src/wrapped/wrappedlibdl.c +++ b/src/wrapped/wrappedlibdl.c @@ -139,6 +139,8 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag) } IncRefCount(dl->dllibs[i].lib, emu); ++dl->dllibs[i].count; + if(!is_local && isLibLocal(dl->dllibs[i].lib)) + promoteLocalLibGlobal(dl->dllibs[i].lib); printf_dlsym(LOG_DEBUG, "dlopen: Recycling %s/%p count=%ld (dlopened=%ld, elf_index=%d)\n", rfilename, (void*)(i+1), dl->dllibs[i].count, dl->dllibs[i].dlopened, GetElfIndex(dl->dllibs[i].lib)); return (void*)(i+1); } |