This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] ldd failures on multilb architectures


Hi all,

/usr/bin/ldd has some slight problems with multilib architectures. First, it tries to execute all eligible 'ld.so', but does not redirect the output to /dev/null, so we always get the nasty 'Cannot execute binary file' error message.
Second, 'ld.so' might return 1 in case it found a statically linked binary. Since ldd only checks for return codes 0 or 2, it fails horribly.
The attached patch fixes this. Please apply.


Please keep me in CC, as I'm not subscribed to this list.

Cheers,

Hannes
--
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux AG				S390 & zSeries
Deutschherrnstr. 15-19			+49 911 74053 688
90429 Nürnberg				http://www.suse.de
--- elf/ldd.bash.in
+++ elf/ldd.bash.in
@@ -127,10 +127,10 @@
     RTLD=
     for rtld in ${RTLDLIST}; do
       if test -x $rtld; then
-	verify_out=`${rtld} --verify "$file"`
+	verify_out=`${rtld} --verify "$file" > /dev/null 2>&1`
         ret=$?
 	case $ret in
-	[02]) RTLD=${rtld}; break;;
+	[012]) RTLD=${rtld}; break;;
 	esac
       fi
     done

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]