瀏覽代碼

Remove /usr/X11R6/lib from search path.
Search in UCLIBC_RUNTIME_PREFIX"lib" before
UCLIBC_RUNTIME_PREFIX"usr/lib".

X11 users should enable USE_CACHE in Rules.mak, add
/usr/X11R6/lib to /etc/ld.so.conf and run ldconfig.

Joakim Tjernlund 21 年之前
父節點
當前提交
dbe235e5d8
共有 2 個文件被更改,包括 4 次插入11 次删除
  1. 2 5
      ldso/ldso/dl-elf.c
  2. 2 6
      utils/ldd.c

+ 2 - 5
ldso/ldso/dl-elf.c

@@ -356,12 +356,9 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
 	if(_dl_debug) _dl_dprintf(_dl_debug_file, "\tsearching full lib path list\n");
 #endif
 	if ((tpnt1 = search_for_named_library(libname, secure,
-					UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib:"
-					UCLIBC_RUNTIME_PREFIX "usr/lib:"
 					UCLIBC_RUNTIME_PREFIX "lib:"
-					"/usr/X11R6/lib:"
-					"/usr/lib:"
-					"/lib", rpnt)
+					UCLIBC_RUNTIME_PREFIX "usr/lib"
+					, rpnt)
 		) != NULL)
 	{
 		return tpnt1;

+ 2 - 6
utils/ldd.c

@@ -338,12 +338,8 @@ void locate_library_file(Elf32_Ehdr* ehdr, Elf32_Dyn* dynamic, int is_suid, stru
 
 	/* Lastly, search the standard list of paths for the library.
 	   This list must exactly match the list in uClibc/ldso/ldso/dl-elf.c */
-	path =	UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib:"
-		UCLIBC_RUNTIME_PREFIX "usr/lib:"
-		UCLIBC_RUNTIME_PREFIX "lib:"
-		"/usr/X11R6/lib:"
-		"/usr/lib:"
-		"/lib";
+	path =	UCLIBC_RUNTIME_PREFIX "lib:"
+		UCLIBC_RUNTIME_PREFIX "usr/lib";
 	search_for_named_library(lib->name, buf, path);
 	if (*buf != '\0') {
 		lib->path = buf;