From d17e960c2bb10746bda675deb88d8b496f834eba Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 17 Oct 1995 01:08:25 +0000 Subject: * 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. --- elf/Makefile | 2 +- elf/ldd.sh.in | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'elf') 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 -- cgit 1.4.1