From 3a8599b21c3127b3d99915b7be58975606f89775 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jul 1999 15:21:35 +0000 Subject: Update. 1999-07-13 Jakub Jelinek * elf/ldd.bash.in: Add support for multiple dynamic linkers. * sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed: On sparc*linux*, try both 32bit and 64bit dynamic linker. * sysdeps/unix/sysv/linux/configure.in: Apply sparc ldd-rewrite script on all sparc targets. 1999-07-13 Jakub Jelinek * sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer to int. --- elf/ldd.bash.in | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'elf/ldd.bash.in') diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in index 5eeba806a8..85e0f88fa0 100644 --- a/elf/ldd.bash.in +++ b/elf/ldd.bash.in @@ -28,7 +28,7 @@ TEXTDOMAIN=libc TEXTDOMAINDIR=@TEXTDOMAINDIR@ -RTLD=@RTLD@ +RTLDLIST=@RTLD@ warn= bind_now= verbose= @@ -125,8 +125,23 @@ for file do elif test -r "$file"; then test -x "$file" || echo 'ldd:' $"\ warning: you do not have execution permission for" "\`$file'" >&2 - verify_out=`${RTLD} --verify "$file"` - case $? in + RTLD= + for rtld in ${RTLDLIST}; do + if test -x $rtld; then + verify_out=`${rtld} --verify "$file"` + ret=$? + case $ret in + [02]) RTLD=${rtld}; break;; + esac + fi + done + if test -z "${RTLD}"; then + set ${RTLDLIST} + RTLD=$1 + verify_out=`${RTLD} --verify "$file"` + ret=$? + fi + case $ret in 0) eval $add_env '"$file"' || result=1 ;; @@ -141,7 +156,7 @@ warning: you do not have execution permission for" "\`$file'" >&2 eval $add_env \${RTLD} '"$file"' || result=1 ;; *) - echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($?)" >&2 + echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2 exit 1 ;; esac -- cgit v1.2.3