jdk/make/common/shared/Defs-linux.gmk
changeset 8008 753c38f4af83
parent 7668 d4a77089c587
child 8796 604a43386301
--- a/jdk/make/common/shared/Defs-linux.gmk	Wed Jul 05 17:31:10 2017 +0200
+++ b/jdk/make/common/shared/Defs-linux.gmk	Wed Jan 05 14:28:58 2011 -0800
@@ -177,3 +177,20 @@
 endif
 HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
 
+# Special define for checking the binaries
+
+# Macro to check it's input file for banned dependencies and verify the
+#   binary built properly. Relies on process exit code.
+define binary_file_verification # binary_file
+( \
+  $(ECHO) "Checking for mapfile use in: $1" && \
+  if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+    $(ECHO) "WARNING: File was not built with a mapfile: $1"; \
+  fi && \
+  $(ECHO) "Library loads for: $1" && \
+  $(LDD) $1 && \
+  $(ECHO) "RUNPATH for: $1" && \
+  ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+)
+endef
+