From 3f2c4ed7943ac0985608e332948b40d873cc741c Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Oct 2022 16:11:19 +0200 Subject: Fixed dlopen that should increment refcount even with RTLD_NOLOAD --- src/wrapped/wrappedlibdl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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); } -- cgit 1.4.1