summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-17 01:08:25 +0000
committerRoland McGrath <roland@gnu.org>1995-10-17 01:08:25 +0000
commitd17e960c2bb10746bda675deb88d8b496f834eba (patch)
treed1c57ef2366aaa53c1b0bd88267c1646966a042a /elf
parentdeab9deadc372fe1a367aef2e78c0d8f2885bf23 (diff)
* elf/Makefile (install-others): Add missing slash.
* elf/ldd.sh.in: Prepend `./' to relative file names so ld.so won't search LD_LIBRARY_PATH.
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile2
-rw-r--r--elf/ldd.sh.in10
2 files changed, 10 insertions, 2 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 45c2cfe854..21d2fc5fd5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -37,7 +37,7 @@ include ../Makeconfig
ifeq (yes,$(build-shared))
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so
-install-others = $(libdir)$(rtld-installed-name)
+install-others = $(libdir)/$(rtld-installed-name)
install-bin = ldd
endif
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