Blame hotspot-remove-debuglink.patch

Alex Kashchenko 03a9057
Remove unnecessary .gnu_debuglink sections from libjvm
Alex Kashchenko 03a9057
Alex Kashchenko 03a9057
The .gnu_debuglink section indicates which file contains the debuginfo. This
Alex Kashchenko 03a9057
is not needed if we not stripping the shared object.
Alex Kashchenko 03a9057
Alex Kashchenko 03a9057
RPM's debuginfo extraction code will add the right file links automatically. As
Alex Kashchenko 03a9057
it is, RPM copies over the .gnu_debuglink link to the debug info file. Without
Alex Kashchenko 03a9057
this patch, the debug info file also ends up containing the .gnu_debuglink
Alex Kashchenko 03a9057
section pointing to a missing (and not needed) file.
Alex Kashchenko 03a9057
Alex Kashchenko 03a9057
diff --git a/make/linux/makefiles/jsig.make b/make/linux/makefiles/jsig.make
Alex Kashchenko 03a9057
--- openjdk/hotspot/make/linux/makefiles/jsig.make
Alex Kashchenko 03a9057
+++ openjdk/hotspot/make/linux/makefiles/jsig.make
Alex Kashchenko 03a9057
@@ -57,14 +57,15 @@
Alex Kashchenko 03a9057
                          $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
Alex Kashchenko 03a9057
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
Alex Kashchenko 03a9057
+  ifeq ($(STRIP_POLICY),all_strip)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
Alex Kashchenko 03a9057
-  ifeq ($(STRIP_POLICY),all_strip)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(STRIP) $@
Alex Kashchenko 03a9057
   else
Alex Kashchenko 03a9057
     ifeq ($(STRIP_POLICY),min_strip)
Alex Kashchenko 03a9057
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
Alex Kashchenko 03a9057
 	$(QUIETLY) $(STRIP) -g $@
Alex Kashchenko 03a9057
+    endif
Alex Kashchenko 03a9057
     # implied else here is no stripping at all
Alex Kashchenko 03a9057
-    endif
Alex Kashchenko 03a9057
   endif
Alex Kashchenko 03a9057
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
Alex Kashchenko 03a9057
 	$(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO)
Alex Kashchenko 03a9057
diff --git a/make/linux/makefiles/saproc.make b/make/linux/makefiles/saproc.make
Alex Kashchenko 03a9057
--- openjdk/hotspot/make/linux/makefiles/saproc.make
Alex Kashchenko 03a9057
+++ openjdk/hotspot/make/linux/makefiles/saproc.make
Alex Kashchenko 03a9057
@@ -99,14 +99,15 @@
Alex Kashchenko 03a9057
 	           -lthread_db
Alex Kashchenko 03a9057
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
Alex Kashchenko 03a9057
+  ifeq ($(STRIP_POLICY),all_strip)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
Alex Kashchenko 03a9057
-  ifeq ($(STRIP_POLICY),all_strip)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(STRIP) $@
Alex Kashchenko 03a9057
   else
Alex Kashchenko 03a9057
     ifeq ($(STRIP_POLICY),min_strip)
Alex Kashchenko 03a9057
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
Alex Kashchenko 03a9057
 	$(QUIETLY) $(STRIP) -g $@
Alex Kashchenko 03a9057
+    endif
Alex Kashchenko 03a9057
     # implied else here is no stripping at all
Alex Kashchenko 03a9057
-    endif
Alex Kashchenko 03a9057
   endif
Alex Kashchenko 03a9057
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
Alex Kashchenko 03a9057
 	$(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
Alex Kashchenko 03a9057
diff --git a/make/linux/makefiles/vm.make b/make/linux/makefiles/vm.make
Alex Kashchenko 03a9057
--- openjdk/hotspot/make/linux/makefiles/vm.make
Alex Kashchenko 03a9057
+++ openjdk/hotspot/make/linux/makefiles/vm.make
Alex Kashchenko 03a9057
@@ -358,14 +358,15 @@
Alex Kashchenko 03a9057
 
Alex Kashchenko 03a9057
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
Alex Kashchenko 03a9057
-	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
Alex Kashchenko 03a9057
   ifeq ($(STRIP_POLICY),all_strip)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(STRIP) $@
Alex Kashchenko 03a9057
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
Alex Kashchenko 03a9057
   else
Alex Kashchenko 03a9057
     ifeq ($(STRIP_POLICY),min_strip)
Alex Kashchenko 03a9057
 	$(QUIETLY) $(STRIP) -g $@
Alex Kashchenko 03a9057
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
Alex Kashchenko 03a9057
+    endif
Alex Kashchenko 03a9057
     # implied else here is no stripping at all
Alex Kashchenko 03a9057
-    endif
Alex Kashchenko 03a9057
   endif
Alex Kashchenko 03a9057
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
Alex Kashchenko 03a9057
 	$(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)