From 9e37dd008d5710f03385c8afd1ef2aed728a8fe0 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 4 Mar 2024 13:40:49 +0100 Subject: [ELFLOADER] Fixes some issue with symbol version matching and unload of failled libs (for #1311, probably other too) --- src/librarian/librarian.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/librarian') diff --git a/src/librarian/librarian.c b/src/librarian/librarian.c index 9b5e82ac..4aff1864 100644 --- a/src/librarian/librarian.c +++ b/src/librarian/librarian.c @@ -333,9 +333,16 @@ int AddNeededLib(lib_t* maplib, int local, int bindnow, int deepbind, needed_lib for (int i=0; ilibs[n-i-1], verneeded, box64, emu)) { printf_log(LOG_INFO, "Error initializing needed lib %s\n", needed->names[i]); - if(!allow_missing_libs) ret = 1; + ret = 1; } // error while loadind lib, unload... + if(ret) { + int n = needed->size; + for (int i=0; ilibs[n-i-1], emu); + } + // all done + if(allow_missing_libs) return 0; return ret; } EXPORTDYN -- cgit 1.4.1