[uClibc-cvs] CVS uClibc/utils

CVS User jocke jocke at codepoet.org
Tue Sep 28 07:29:13 UTC 2004


Update of /var/cvs/uClibc/utils
In directory nail:/tmp/cvs-serv30929

Modified Files:
	ldd.c 
Log Message:
Make ldd work for ET_DYN executables. From Peter Mazinger.


--- /var/cvs/uClibc/utils/ldd.c	2004/03/18 11:17:14	1.13
+++ /var/cvs/uClibc/utils/ldd.c	2004/09/28 07:29:13	1.14
@@ -550,7 +550,7 @@
 		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 @@
 	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))
 	{



More information about the uClibc-cvs mailing list