diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 2 | ||||
-rw-r--r-- | elf/ldd.sh.in | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/elf/Makefile b/elf/Makefile index 45c2cfe..21d2fc5 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 58ae501..ed43789 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 |