about summary refs log tree commit diff
path: root/elf/ldd.bash.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-14 15:21:35 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-14 15:21:35 +0000
commit3a8599b21c3127b3d99915b7be58975606f89775 (patch)
treedd0ecb9ed5ec00268ea89e2849d7848d3d07fba4 /elf/ldd.bash.in
parentc33bd0123ed605d201ee43dcd80998b6ab858022 (diff)
downloadglibc-3a8599b21c3127b3d99915b7be58975606f89775.tar.gz
glibc-3a8599b21c3127b3d99915b7be58975606f89775.tar.xz
glibc-3a8599b21c3127b3d99915b7be58975606f89775.zip
Update.
1999-07-13  Jakub Jelinek  <jj@ultra.linux.cz>

	* 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  <jj@ultra.linux.cz>

	* sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer
	to int.
Diffstat (limited to 'elf/ldd.bash.in')
-rw-r--r--elf/ldd.bash.in23
1 files changed, 19 insertions, 4 deletions
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