diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-09-28 07:29:13 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-09-28 07:29:13 +0000 |
commit | 83774a2dac04821b14791095d71f128c3f999336 (patch) | |
tree | 4d6737eeb3ececfe3fb8061afecd34b33d10590f /utils | |
parent | 54a760b1c0835ded3e8fbefde6391824bc5c531e (diff) | |
download | uClibc-alpine-83774a2dac04821b14791095d71f128c3f999336.tar.bz2 uClibc-alpine-83774a2dac04821b14791095d71f128c3f999336.tar.xz |
Make ldd work for ET_DYN executables. From Peter Mazinger.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ldd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ldd.c b/utils/ldd.c index 977ce8b2c..47bdce43f 100644 --- a/utils/ldd.c +++ b/utils/ldd.c @@ -550,7 +550,7 @@ foo: fprintf(stderr, "%s: not a dynamic executable\n", filename); return -1; } - if (ehdr->e_type == ET_EXEC) { + if (ehdr->e_type == ET_EXEC || ehdr->e_type != ET_DYN) { if (statbuf.st_mode & S_ISUID) is_suid = 1; if ((statbuf.st_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) @@ -564,7 +564,7 @@ foo: interp = find_elf_interpreter(ehdr); #ifdef __LDSO_LDD_SUPPORT - if (interp && ehdr->e_type == ET_EXEC && ehdr->e_ident[EI_CLASS] == ELFCLASSM && + if (interp && (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN) && ehdr->e_ident[EI_CLASS] == ELFCLASSM && ehdr->e_ident[EI_DATA] == ELFDATAM && ehdr->e_ident[EI_VERSION] == EV_CURRENT && MATCH_MACHINE(ehdr->e_machine)) { |