3 # This is the `ldd' command, which lists what shared libraries are
4 # used by given dynamically-linked executables. It works by invoking the
5 # run-time dynamic linker as a command and giving it the special `--list'
12 echo >&2 "Usage: $0 FILE..."
15 # We don't list the file name when there is only one.
20 if ${RTLD} --verify "$file"; then
21 LD_TRACE_LOADED_OBJECTS
=1 exec ${RTLD} "$file" && exit 1
23 echo ' not a dynamic executable'
27 set -e # Bail out immediately if ${RTLD} loses on any argument.
34 if ${RTLD} --verify "$file"; then
35 LD_TRACE_LOADED_OBJECTS
=1 ${RTLD} "$file"
37 echo ' not a dynamic executable'