]> Git Repo - uclibc-ng.git/commitdiff
Make ldd work for ET_DYN executables. From Peter Mazinger.
authorJoakim Tjernlund <[email protected]>
Tue, 28 Sep 2004 07:29:13 +0000 (07:29 -0000)
committerJoakim Tjernlund <[email protected]>
Tue, 28 Sep 2004 07:29:13 +0000 (07:29 -0000)
utils/ldd.c

index 977ce8b2c99cf1b19d977976d54c51603ba26bf8..47bdce43ff8552cbe49838fc7be2de79dc3c7946 100644 (file)
@@ -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))
        {
This page took 0.023494 seconds and 4 git commands to generate.