[git commit branch/0.9.33] ldd: silence warning if !LDSO_LDD_SUPPORT

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue May 15 07:14:52 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=7e87c65e254ff8dabdeb1e559a3de18ca21706c8
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 utils/ldd.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/utils/ldd.c b/utils/ldd.c
index c56ddc8..ed7dfa5 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -546,6 +546,7 @@ static void find_needed_libraries(ElfW(Ehdr) *ehdr, ElfW(Dyn) *dynamic, int is_s
 	}
 }
 
+#ifdef __LDSO_LDD_SUPPORT__
 static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr)
 {
 	ElfW(Phdr) *phdr;
@@ -611,6 +612,7 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr)
 	}
 	return NULL;
 }
+#endif /* __LDSO_LDD_SUPPORT__ */
 
 /* map the .so, and locate interesting pieces */
 /*
@@ -620,11 +622,13 @@ static int find_dependencies(char *filename)
 {
 	int is_suid = 0;
 	FILE *thefile;
-	struct library *interp;
 	struct stat statbuf;
 	ElfW(Ehdr) *ehdr = NULL;
 	ElfW(Shdr) *dynsec = NULL;
 	ElfW(Dyn) *dynamic = NULL;
+#ifdef __LDSO_LDD_SUPPORT__
+	struct library *interp;
+#endif
 
 	if (filename == not_found)
 		return 0;
@@ -681,9 +685,9 @@ foo:
 	}
 
 	interpreter_already_found = 0;
+#ifdef __LDSO_LDD_SUPPORT__
 	interp = find_elf_interpreter(ehdr);
 
-#ifdef __LDSO_LDD_SUPPORT__
 	if (interp
 	    && (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN)
 	    && ehdr->e_ident[EI_CLASS] == ELFCLASSM


More information about the uClibc-cvs mailing list