about summary refs log tree commit diff stats
path: root/src/librarian/library.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-04 12:01:58 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-04 12:01:58 +0200
commitf4c8c295107e0c1af7c3ef033d5880daca61992c (patch)
treeeee69db9c6833d7a9a26ec9715d2369163170b3d /src/librarian/library.c
parent87be9fd1ad3c743bbc109e2e4e0bd79a04d83d14 (diff)
downloadbox64-f4c8c295107e0c1af7c3ef033d5880daca61992c.tar.gz
box64-f4c8c295107e0c1af7c3ef033d5880daca61992c.zip
[ELF_LOAD] Also use SONAME of loaded elf to match loaded libs (helps #805)
Diffstat (limited to 'src/librarian/library.c')
-rwxr-xr-xsrc/librarian/library.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librarian/library.c b/src/librarian/library.c
index a74dea23..9b2bb997 100755
--- a/src/librarian/library.c
+++ b/src/librarian/library.c
@@ -615,11 +615,16 @@ int IsSameLib(library_t* lib, const char* path)
     if(!strchr(path, '/') || lib->type==LIB_WRAPPED || !lib->path) {
         if(strcmp(name, lib->name)==0)
             ret=1;
+        if(lib->type==LIB_EMULATED && lib->e.elf->soname && !strcmp(lib->e.elf->soname, path))
+            ret=1;
     } else {
         char rpath[PATH_MAX];
         box_realpath(path, rpath);
         if(!strcmp(rpath, lib->path))
             ret=1;
+        if(lib->type==LIB_EMULATED && lib->e.elf->path && !strcmp(lib->e.elf->path, rpath)) {
+            ret=1;
+        }
     }
     if(!ret) {
         int n = NbDot(name);