Browse Source

Mike Frysinger writes:
i was sticking some libraries in non-standard (i.e. not-hardcoded) paths and
then updating ld.so.conf accordingly ... oddly though, i couldnt get binaries
that linked against those libraries to run ... `ldconfig -v` showed the
required libraries being detected/cached, so something seemed wrong ...

turns out the libraries were being tagged as LIB_ELF_LIBC0 in the cache and
the loader currently only accepts LIB_ELF_LIBC{5,6} ... since readsoname.c in
ldconfig defines needed_tab with the mapping 'libc.so.0' -> LIB_ELF_LIBC0 it
seems like the loader should accept this type too

find attached a small patch which adds LIB_ELF_LIBC0 along side
LIB_ELF_LIBC{5,6} as an accepted lib type in the loader when dealing with the
ld.so.cache file

Joakim Tjernlund 21 years ago
parent
commit
7c2d61733a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ldso/ldso/dl-elf.c

+ 1 - 0
ldso/ldso/dl-elf.c

@@ -329,6 +329,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
 #endif
 		for (i = 0; i < header->nlibs; i++) {
 			if ((libent[i].flags == LIB_ELF ||
+						libent[i].flags == LIB_ELF_LIBC0 ||
 						libent[i].flags == LIB_ELF_LIBC5) &&
 					_dl_strcmp(libname, strs + libent[i].sooffset) == 0 &&
 					(tpnt1 = _dl_load_elf_shared_library(secure,