diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-10-27 16:11:19 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-10-27 16:11:19 +0200 |
| commit | 3f2c4ed7943ac0985608e332948b40d873cc741c (patch) | |
| tree | dd6783d78fbdbf708661be7d026d956c1504f827 /src | |
| parent | 978256179b9e45094251e79cdcfd6c52d7c9e9e0 (diff) | |
| download | box64-3f2c4ed7943ac0985608e332948b40d873cc741c.tar.gz box64-3f2c4ed7943ac0985608e332948b40d873cc741c.zip | |
Fixed dlopen that should increment refcount even with RTLD_NOLOAD
Diffstat (limited to 'src')
| -rwxr-xr-x | src/wrapped/wrappedlibdl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c index d452a8d8..3a6d505d 100755 --- a/src/wrapped/wrappedlibdl.c +++ b/src/wrapped/wrappedlibdl.c @@ -114,8 +114,7 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag) ReloadLibrary(dl->libs[i], emu); // reset memory image, redo reloc, run inits } } - if(!(flag&0x4)) - dl->count[i] = dl->count[i]+1; + dl->count[i] = dl->count[i]+1; printf_dlsym(LOG_DEBUG, "dlopen: Recycling %s/%p count=%ld (dlopened=%ld, elf_index=%d)\n", rfilename, (void*)(i+1), dl->count[i], dl->dlopened[i], GetElfIndex(dl->libs[i])); return (void*)(i+1); } |