summary refs log tree commit diff
path: root/elf/ldd.bash.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-24 16:46:16 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-24 16:46:16 +0000
commited1ac6a2d6c744bdbd4751efc86326ceafeac26c (patch)
tree5ca6ee6384dfd1a25493058d4debe985b101a3b0 /elf/ldd.bash.in
parentc2228a513135bb229cd9c9984e38e52143d5f6dd (diff)
downloadglibc-ed1ac6a2d6c744bdbd4751efc86326ceafeac26c.tar.gz
glibc-ed1ac6a2d6c744bdbd4751efc86326ceafeac26c.tar.xz
glibc-ed1ac6a2d6c744bdbd4751efc86326ceafeac26c.zip
Update.
1998-08-24 16:34  Ulrich Drepper  <drepper@cygnus.com>

	* debug/catchsegv.sh: Handle text preceding backtrace better.
	* sysdeps/generic/segfault.c: Allow register dump.  Allow handler
	to be installed for other signals than SIGSEGV.
	* sysdeps/generic/register-dump.h: New file.
	* sysdeps/i386/register-dump.h: New file.
	* sysdeps/powerpc/register-dump.h: New file.

	* sysdeps/unix/sysv/linux/i386/profil-counter.h: Use macros from
	sigcontextinfo.h.
	* sysdeps/unix/sysv/linux/powerpc/profil-counter.h: Use i386 version.

1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: New file.

1998-08-09  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/unix/sysv/linux/powerpc/chown.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/lchown.S: New file.
	* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Add chown, remove
	getresuid, getresgid.

1998-08-16  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/unix/sysv/linux/powerpc/clone.S: Fix bugs.  Set up stack
	pointer in userland.

1998-08-21  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/sys/mount.h (MNT_FORCE): Define as enum
	and fix value.

1998-08-22  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/ldd.bash.in: Add missing quotes around $file.  Make loop
	over arguments Bourne shell compatible.  Don't exit unsuccessfully
	if nonelf returns successfully.  Avoid duplicating most of the
	script.
	* sysdeps/unix/sysv/linux/ldd-rewrite.sed: Add missing quotes
	around $file.

1998-08-24 10:37  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* libio/Versions (_IO_do_write, _IO_file_attach,
	_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
	_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
	_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
	_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.1.

	* libio/fileops.c (_IO_do_write, _IO_file_attach,
	_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
	_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
	_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
	_IO_file_write, _IO_file_xsputn): Change the prefix to
	"_IO_new_". Added to GLIBC_2.1.

	* libio/libioP.h (_IO_do_write, _IO_file_attach,
	_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
	_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
	_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
	_IO_file_write, _IO_file_xsputn): Add prototypes for the prefix
	"_IO_new_".

	* libio/oldfileops.c (_IO_do_write, _IO_file_attach,
	_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
	_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
	_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
	_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.0.

	* csu/initfini.c: Return to .text before __gmon_start__.
	* elf/elf.h (EM_FAKE_ALPHA): Rename from EM_OLD_ALPHA.
	(STO_MIPS_*): Rename from STO_*.
	(STB_MIPS_SPLIT_COMMON): Rename from STB_SPLIT_COMMON.
	(STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New.
	* math/atest-exp.c (mpn_bitsize): Fix bit location calculation.
	(main): e3s is negative on zero.
	* math/atest-exp2.c: Likewise.
1998-08-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* Makerules (install): Add comment about absolute paths.
Diffstat (limited to 'elf/ldd.bash.in')
-rw-r--r--elf/ldd.bash.in81
1 files changed, 24 insertions, 57 deletions
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index f6ffa6b4e8..aeaf695aac 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -102,33 +102,43 @@ case $# in
   exit 1
   ;;
 1)
+  single_file=t
+  ;;
+*)
+  single_file=f
+  ;;
+esac
+
+result=0
+for file do
   # We don't list the file name when there is only one.
-  case "$1" in
-  */*) file="$1"
+  test $single_file = t || echo "${file}:"
+  case $file in
+  */*) :
        ;;
-  *) file="./$1"
+  *) file=./$file
      ;;
   esac
   if test ! -f "$file"; then
-    echo "ldd: ${file}:" $"no such file"
-    exit 1
+    echo "ldd: ${file}:" $"No such file or directory" >&2
+    result=1
   elif test -r "$file"; then
-    test -x "$file" ||
-    echo 'ldd:' $"\
+    test -x "$file" || echo 'ldd:' $"\
 warning: you do not have execution permission for" "\`$file'" >&2
     verify_out=`${RTLD} --verify "$file"`
     case $? in
     0)
-      eval $add_env exec '"$file"' || exit 1
+      eval $add_env '"$file"' || result=1
       ;;
     1)
       # This can be a non-ELF binary or no binary at all.
-      nonelf $file ||
-      echo $"	not a dynamic executable"
-      exit 1
+      nonelf "$file" || {
+	echo $"	not a dynamic executable"
+	result=1
+      }
       ;;
     2)
-      eval $add_env exec \${RTLD} '"$file"' || exit 1
+      eval $add_env \${RTLD} '"$file"' || result=1
       ;;
     *)
       echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($?)" >&2
@@ -137,52 +147,9 @@ warning: you do not have execution permission for" "\`$file'" >&2
     esac
   else
     echo 'ldd:' $"error: you do not have read permission for" "\`$file'" >&2
-    exit 1
+    result=1
   fi
-  exit
-  ;;
-*)
-  result=0
-  for file; do
-    echo "${file}:"
-    case "$file" in
-    */*) :
-         ;;
-    *) file="./$file"
-       ;;
-    esac
-    if test ! -f "$file"; then
-      echo "ldd: ${file}:" $"no such file"
-      result=1
-    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
-      0)
-	eval $add_env '"$file"' || result=1
-	;;
-      1)
-	# This can be a non-ELF binary or no binary at all.
-	nonelf $file || {
-	  echo $"	not a dynamic executable"
-	  result=1
-	}
-	;;
-      2)
-        eval $add_env ${RTLD} '"$file"' || result=1
-	;;
-      *)
-	echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($?)" >&2
-	exit 1
-	;;
-      esac
-    else
-      echo 'ldd:' $"error: you do not have read permission for" "\`$file'" >&2
-      result=1
-    fi
-  done
-esac
+done
 
 exit $result
 # Local Variables: