diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-05-08 19:20:09 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-05-08 19:20:09 +0200 |
commit | 7a5c294ecf58f67f46c38fce4424575ed4c4af8a (patch) | |
tree | 2e7726c71b90865ee419a31d58e1043170bac746 | |
parent | 7dd2d7821e91a6e1f894278853eab10aa57b84e5 (diff) |
ldd: silence warning if !LDSO_LDD_SUPPORT
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | utils/ldd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/ldd.c b/utils/ldd.c index 38138342c..a72cd09d0 100644 --- a/utils/ldd.c +++ b/utils/ldd.c @@ -545,6 +545,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; @@ -610,6 +611,7 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr) } return NULL; } +#endif /* __LDSO_LDD_SUPPORT__ */ /* map the .so, and locate interesting pieces */ /* @@ -619,11 +621,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; @@ -680,9 +684,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 |