7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
authordcubed
Tue, 20 Sep 2011 19:16:21 -0700
changeset 10603 c315c8424ce2
parent 10602 ab8c1e3b237b
child 10604 3f7bd2de5067
7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link Summary: Add support for importing .debuginfo files from HSX. Reviewed-by: phh
jdk/make/common/Defs-linux.gmk
jdk/make/common/Defs-solaris.gmk
jdk/make/java/redist/Makefile
jdk/make/java/redist/sajdi/Makefile
--- a/jdk/make/common/Defs-linux.gmk	Tue Sep 20 18:33:25 2011 -0700
+++ b/jdk/make/common/Defs-linux.gmk	Tue Sep 20 19:16:21 2011 -0700
@@ -74,6 +74,57 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
+# Default OBJCOPY comes from GNU Binutils on Linux:
+DEF_OBJCOPY=/usr/bin/objcopy
+ifdef CROSS_COMPILE_ARCH
+  # don't try to generate .debuginfo files when cross compiling
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
+      "skipping .debuginfo generation.")
+  OBJCOPY=
+else
+  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+  ifneq ($(ALT_OBJCOPY),)
+    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+  endif
+endif
+
+ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
+# The setting of OBJCOPY above enables the JDK build to import
+# .debuginfo files from the HotSpot build. However, adding FDS
+# support to the JDK build will occur in phases so a different
+# make variable is used to indicate that a particular library
+# supports FDS.
+
+ifeq ($(OBJCOPY),)
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+else
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+  # Library stripping policies for .debuginfo configs:
+  #   all_strip - strips everything from the library
+  #   min_strip - strips most stuff from the library; leaves minimum symbols
+  #   no_strip  - does not strip the library at all
+  #
+  # Oracle security policy requires "all_strip". A waiver was granted on
+  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+  #
+  DEF_STRIP_POLICY="min_strip"
+  ifeq ($(ALT_STRIP_POLICY),)
+    STRIP_POLICY=$(DEF_STRIP_POLICY)
+  else
+    STRIP_POLICY=$(ALT_STRIP_POLICY)
+  endif
+
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+endif
+endif
+
 #
 # Default optimization
 #
@@ -359,6 +410,7 @@
 # Settings for the JDI - Serviceability Agent binding.
 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
+SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
 
 # The JDI - Serviceability Agent binding is not currently supported
 # on Linux-ia64.
--- a/jdk/make/common/Defs-solaris.gmk	Tue Sep 20 18:33:25 2011 -0700
+++ b/jdk/make/common/Defs-solaris.gmk	Tue Sep 20 19:16:21 2011 -0700
@@ -74,6 +74,69 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
+ifdef ENABLE_FULL_DEBUG_SYMBOLS
+# Only check for Full Debug Symbols support on Solaris if it is
+# specifically enabled. Hopefully, it can be enabled by default
+# once the .debuginfo size issues are worked out.
+
+# Default OBJCOPY comes from the SUNWbinutils package:
+DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
+ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
+  # On Solaris AMD64/X64, gobjcopy is not happy and fails:
+  #
+  # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
+  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
+  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+  # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
+  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
+  OBJCOPY=
+else
+  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+  ifneq ($(ALT_OBJCOPY),)
+    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+  endif
+endif
+
+ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
+# The setting of OBJCOPY above enables the JDK build to import
+# .debuginfo files from the HotSpot build. However, adding FDS
+# support to the JDK build will occur in phases so a different
+# make variable is used to indicate that a particular library
+# supports FDS.
+
+ifeq ($(OBJCOPY),)
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+else
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+  # Library stripping policies for .debuginfo configs:
+  #   all_strip - strips everything from the library
+  #   min_strip - strips most stuff from the library; leaves minimum symbols
+  #   no_strip  - does not strip the library at all
+  #
+  # Oracle security policy requires "all_strip". A waiver was granted on
+  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+  #
+  DEF_STRIP_POLICY="min_strip"
+  ifeq ($(ALT_STRIP_POLICY),)
+    STRIP_POLICY=$(DEF_STRIP_POLICY)
+  else
+    STRIP_POLICY=$(ALT_STRIP_POLICY)
+  endif
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+endif
+endif
+endif
+
 #
 # Java default optimization (-x04/-O2) etc.  Applies to the VM.
 #
@@ -684,5 +747,6 @@
 # Settings for the JDI - Serviceability Agent binding.
 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
+SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
 INCLUDE_SA=true
 
--- a/jdk/make/java/redist/Makefile	Tue Sep 20 18:33:25 2011 -0700
+++ b/jdk/make/java/redist/Makefile	Tue Sep 20 19:16:21 2011 -0700
@@ -58,6 +58,11 @@
 JVMDB_NAME             = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
 JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
 
+JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
+LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
+JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
+JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
+
 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
 
 # Needed to do file copy
@@ -79,6 +84,12 @@
 ifndef BUILD_CLIENT_ONLY
   IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
                 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
+    endif
+  endif
 else
   IMPORT_LIST =
 endif
@@ -88,6 +99,12 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
                  $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
+    endif
+  endif
 endif
 endif
 
@@ -157,16 +174,40 @@
 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
 
 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) 
+ifneq ($(OBJCOPY),)
+  # the import JDK may not contain .debuginfo files
+  ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+  endif
+endif
 ifndef BUILD_CLIENT_ONLY
   IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain the target of the symlink
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+    endif
+  endif
 endif
 
 ifeq ($(PLATFORM), solaris)
   ifndef BUILD_CLIENT_ONLY
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
+    ifneq ($(OBJCOPY),)
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+      endif
+    endif
     # The conditional can be removed when import JDKs contain these files.
     ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
       IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
+      ifneq ($(OBJCOPY),)
+        # the import JDK may not contain .debuginfo files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+        endif
+      endif
     else
       $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
     endif 
@@ -177,17 +218,37 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
 
 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
+ifneq ($(OBJCOPY),)
+  # the import JDK may not contain the target of the symlink
+  ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+  endif
+endif
 
 ifeq ($(PLATFORM), solaris)
 #  solaris   vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  solaris
 
 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
+ifneq ($(OBJCOPY),)
+  # the import JDK may not contain .debuginfo files
+  ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+  endif
+endif
 
 # The conditional can be removed when import JDKs contain these files.
 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME)
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+  endif
+  endif
 else
   $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
 endif
@@ -196,6 +257,12 @@
   # The conditional can be removed when import JDKs contain these files.
   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
+    ifneq ($(OBJCOPY),)
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+      endif
+    endif
   else
     $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
   endif
@@ -203,6 +270,12 @@
   # The conditional can be removed when import JDKs contain these files.
   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
+    ifneq ($(OBJCOPY),)
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+      endif
+    endif
   else
     $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
  endif
@@ -229,6 +302,11 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME)
 	$(install-file)
 	@$(call binary_file_verification,$@)
@@ -237,15 +315,33 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
+
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
+	@$(prep-target)
+	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
+endif
 else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
+
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
+	@$(prep-target)
+	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
+endif
 endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
@@ -256,6 +352,14 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
 	$(install-import-file)
@@ -264,6 +368,14 @@
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
+
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
 endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
@@ -274,6 +386,14 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
 	$(install-import-file)
@@ -287,6 +407,17 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
 	$(install-import-file)
 endif
--- a/jdk/make/java/redist/sajdi/Makefile	Tue Sep 20 18:33:25 2011 -0700
+++ b/jdk/make/java/redist/sajdi/Makefile	Tue Sep 20 19:16:21 2011 -0700
@@ -56,6 +56,12 @@
     IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
                    $(LIB_LOCATION)/$(SAPDB_NAME)
   endif
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
+    endif
+  endif
 endif # INCLUDE_SA
 
 
@@ -79,6 +85,11 @@
 $(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
 	$(install-import-file)
 endif # windows
+
+  ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
+	$(install-import-file)
+  endif
 endif # INCLUDE_SA
 
 all: $(IMPORT_LIST)