[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclibc-cvs
Subject:    [uClibc-cvs] CVS uClibc/utils
From:       jocke () codepoet ! org (CVS User jocke)
Date:       2004-09-28 1:29:15
Message-ID: 20040928072913.878D7B4012 () codepoet ! org
[Download RAW message or body]

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))
 	{


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic