]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/ldd.sh.in
Update.
[thirdparty/glibc.git] / elf / ldd.sh.in
index 884472f654acc8d41082ffee64ee5e656bdbe1f3..a82deb5cb717be523066d7e5d9559a59781177ed 100644 (file)
@@ -83,6 +83,12 @@ Try \`ldd --help' for more information."
   esac
 done
 
+nonelf ()
+{
+  # Maybe extra code for non-ELF binaries.
+  return 1;
+}
+
 add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
 add_env="$add_env LD_VERBOSE=$verbose"
 case $# in
@@ -113,6 +119,7 @@ Try \`ldd --help' for more information."
        eval $add_env exec '"$file"' || exit 1
        ;;
       1)
+        nonelf $file ||
        echo '  not a dynamic executable'
        exit 1
        ;;
@@ -155,6 +162,7 @@ ldd: warning: you do not have execution permission for \`$file'"
          eval $add_env '"$file"' || result=1
          ;;
        1)
+          nonelf $file ||
          echo '        not a dynamic executable'
          result=1
          ;;