Print this page
rev 6896 : 8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
8034005: cannot debug in synchronizer.o or objectMonitor.o on Solaris X86
Summary: Solaris needs objcopy version of 2.21.1 or newer is needed to create valid .debuginfo files.
Reviewed-by: dsamersoff, sspitsyn, dholmes, ihse

Split Split Close
Expand all
Collapse all
          --- old/hotspot/make/solaris/makefiles/vm.make
          +++ new/hotspot/make/solaris/makefiles/vm.make
   1    1  #
   2      -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
        2 +# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
   3    3  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4  #
   5    5  # This code is free software; you can redistribute it and/or modify it
   6    6  # under the terms of the GNU General Public License version 2 only, as
   7    7  # published by the Free Software Foundation.
   8    8  #
   9    9  # This code is distributed in the hope that it will be useful, but WITHOUT
  10   10  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11  # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12  # version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 133 lines elided ↑ open up ↑
 146  146  # By default, link the *.o into the library, not the executable.
 147  147  LINK_INTO$(LINK_INTO) = LIBJVM
 148  148  
 149  149  JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
 150  150  
 151  151  #----------------------------------------------------------------------
 152  152  # jvm_db & dtrace
 153  153  include $(MAKEFILES_DIR)/dtrace.make
 154  154  
 155  155  #----------------------------------------------------------------------
 156      -# add_gnu_debuglink tool
 157      -include $(MAKEFILES_DIR)/add_gnu_debuglink.make
 158      -
 159      -#----------------------------------------------------------------------
 160      -# fix_empty_sec_hdr_flags tool
 161      -include $(MAKEFILES_DIR)/fix_empty_sec_hdr_flags.make
 162      -
 163      -#----------------------------------------------------------------------
 164  156  # JVM
 165  157  
 166  158  JVM      = jvm
 167  159  LIBJVM   = lib$(JVM).so
 168  160  
 169  161  LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 170  162  LIBJVM_DIZ         = lib$(JVM).diz
 171  163  
 172  164  SPECIAL_PATHS:=adlc c1 dist gc_implementation opto shark libadt
 173  165  
↓ open down ↓ 118 lines elided ↑ open up ↑
 292  284    LIBS_VM                  += $(STATIC_STDCXX) $(LIBS)
 293  285  endif
 294  286  endif
 295  287  
 296  288  ifdef USE_GCC
 297  289  LINK_VM = $(LINK_LIB.CC)
 298  290  else
 299  291  LINK_VM = $(LINK_LIB.CXX)
 300  292  endif
 301  293  # making the library:
 302      -$(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_MAPFILE)
      294 +$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE)
 303  295  ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 304  296          @echo Linking vm...
 305  297          $(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
 306  298          $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
 307  299          $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
 308  300          $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
 309  301  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 310      -# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
 311      -# Clear the SHF_ALLOC flag (if set) from empty section headers.
 312      -# An empty section header has sh_addr == 0 and sh_size == 0.
 313      -# This problem has only been seen on Solaris X64, but we call this tool
 314      -# on all Solaris builds just in case.
 315      -        $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@
 316  302          $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
 317      -# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
 318      -# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
 319      -#       $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 320      -        $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBJVM_DEBUGINFO) $@
      303 +        $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
 321  304    ifeq ($(STRIP_POLICY),all_strip)
 322  305          $(QUIETLY) $(STRIP) $@
 323  306    else
 324  307      ifeq ($(STRIP_POLICY),min_strip)
 325  308          $(QUIETLY) $(STRIP) -x $@
 326  309      # implied else here is no stripping at all
 327  310      endif
 328  311    endif
 329  312    ifeq ($(ZIP_DEBUGINFO_FILES),1)
 330  313          $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
↓ open down ↓ 35 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX