summary refs log tree commit diff
path: root/elf/ldd.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'elf/ldd.sh.in')
-rw-r--r--elf/ldd.sh.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/elf/ldd.sh.in b/elf/ldd.sh.in
index 58ae501e53..ed43789cfa 100644
--- a/elf/ldd.sh.in
+++ b/elf/ldd.sh.in
@@ -13,12 +13,20 @@ case $# in
   exit 1 ;;
 1)
   # We don't list the file name when there is only one.
-  exec ${RTLD} --list "$1" && exit 1
+  case "$1" in
+  /*) file="$1" ;;
+  *) file="./$1" ;;
+  esac
+  exec ${RTLD} --list "$file" && exit 1
   exit ;;
 *)
   set -e	# Bail out immediately if ${RTLD} loses on any argument.
   for file; do
     echo "${file}:"
+    case "$file" in
+    /*) file="$file" ;;
+    *) file="./$file" ;;
+    esac
     ${RTLD} --list "$file"
   done
 esac