From 246af1d52ea6e0ae2cd67b89bc5ab7c4e3e3303d Mon Sep 17 00:00:00 2001
From: Eric Andersen <andersen@codepoet.org>
Date: Sat, 11 Aug 2001 04:09:22 +0000
Subject: Sync up ldd behavior

---
 ldso/util/ldd.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'ldso')

diff --git a/ldso/util/ldd.c b/ldso/util/ldd.c
index e8627fb0a..0cf3c798e 100644
--- a/ldso/util/ldd.c
+++ b/ldso/util/ldd.c
@@ -101,7 +101,8 @@ int check_elf_header(Elf32_Ehdr const *const ehdr)
 	return 0;
 }
 
-/* This function must exactly match that in uClibc/ldso/util/ldd.c */
+/* This function's behavior must exactly match that 
+ * in uClibc/ldso/d-link/readelflib1.c */
 static void search_for_named_library(char *name, char *result, const char *path_list)
 {
 	int i, count = 0;
@@ -121,7 +122,7 @@ static void search_for_named_library(char *name, char *result, const char *path_
 		memmove(path_n, path_n+1, i-1);
 	}
 
-	/* Replace colons with zeros in path_parsed and count them */
+	/* Replace colons with zeros in path_list and count them */
 	for(i=strlen(path); i > 0; i--) {
 		if (path[i]==':') {
 			path[i]=0;
@@ -196,9 +197,12 @@ void locate_library_file(Elf32_Ehdr* ehdr, Elf32_Dyn* dynamic, char *strtab, int
 		}
 	}
 
+#ifdef USE_CACHE
 	/* FIXME -- add code to check the Cache here */ 
+#endif
 
-	/* Lastly, search the standard list of paths for the library */
+	/* Lastly, search the standard list of paths for the library.
+	   This list must exactly match the list in uClibc/ldso/d-link/readelflib1.c */
 	path =	UCLIBC_TARGET_PREFIX "/usr/lib:"
 			UCLIBC_TARGET_PREFIX "/lib:"
 			UCLIBC_DEVEL_PREFIX "/lib:"
-- 
cgit v1.2.3