From b1cd8389a20d6a45b92bc82f92a046008d334ce5 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 13 Feb 2004 10:52:41 +0000 Subject: Fix the annoying "not a dynamic executable" problem when running ldd on libuClibc --- utils/ldd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utils') diff --git a/utils/ldd.c b/utils/ldd.c index e86610223..96cffffeb 100644 --- a/utils/ldd.c +++ b/utils/ldd.c @@ -367,7 +367,7 @@ static int add_library(Elf32_Ehdr* ehdr, Elf32_Dyn* dynamic, int is_setuid, char tmp++; } - /* We add libc.so.0 elsewhere */ + /* We add ldso elsewhere */ if (interpreter_already_found && (tmp=strrchr(interp, '/')) != NULL) { int len = strlen(interp_dir); @@ -523,7 +523,7 @@ int find_dependancies(char* filename) goto foo; /* mmap the file to make reading stuff from it effortless */ - ehdr = (Elf32_Ehdr *)mmap(0, statbuf.st_size, + ehdr = (Elf32_Ehdr *)mmap(0, statbuf.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fileno(thefile), 0); foo: @@ -658,9 +658,9 @@ int main( int argc, char** argv) got_em_all=1; printf("\t%s => %s (0x00000000)\n", cur->name, cur->path); } - if (interp_dir && got_em_all==1) + if (interp && interpreter_already_found==1) printf("\t%s => %s (0x00000000)\n", interp, interp); - if (got_em_all==0) + else printf("\tnot a dynamic executable\n"); for (cur = lib_list; cur; cur=cur->next) { -- cgit v1.2.3