1 --- elf/ldd.bash.in~ Tue Apr 3 21:43:31 2001
2 +++ elf/ldd.bash.in Tue Apr 3 21:54:15 2001
7 +filename_magic_regex="((^|/)lib|.so$)"
9 while test $# -gt 0; do
12 echo "ldd: ${file}:" $"No such file or directory" >&2
14 elif test -r "$file"; then
15 - test -x "$file" || echo 'ldd:' $"\
16 -warning: you do not have execution permission for" "\`$file'" >&2
17 + if test ! -x "$file" && eval echo "$file" \
18 + | egrep -v "$filename_magic_regex" > /dev/null; then
19 + echo 'ldd:' $"warning: you do not have execution permission for"\
23 for rtld in ${RTLDLIST}; do
24 if test -x $rtld; then
29 - eval $add_env '"$file"' || result=1
30 + if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \
31 + | sed 10q | egrep "$file_magic_regex" > /dev/null; then
32 + eval $add_env ${RTLD} '"$file"' || result=1
34 + eval $add_env '"$file"' || result=1
38 # This can be a non-ELF binary or no binary at all.