# # Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. #
################################################################################ # Combine a list of static symbols
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86_64)), false) # On Windows x86_64, we should not have any symbols at all, since that # results in duplicate warnings from the linker (JDK-8043491).
SYMBOLS_SRC += $(TOPDIR)/make/data/hotspot-symbols/symbols-shared endif
################################################################################ # Create a dynamic list of symbols from the built object files. This is highly # platform dependent.
elseifeq ($(call isTargetOs, macosx), true) # nm on macosx prints out "warning: nm: no name list" to stderr for # files without symbols. Hide this, even at the expense of hiding real errors.
DUMP_SYMBOLS_CMD := $(NM) -Uj *$(OBJ_SUFFIX) 2> /dev/null ifneq ($(FILTER_SYMBOLS_PATTERN), )
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)| endif
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM
FILTER_SYMBOLS_AWK_SCRIPT := \ '{ \ if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
}'
# NOTE: The script is from the old build. It is broken and finds no symbols. # The script below might be what was intended, but it fails to link with tons # of 'cannot export hidden symbol vtable for X'. # '{ if ($$1 ~ /^__ZTV/ || $$1 ~ /^_gHotSpotVM/) print substr($$1, 2) }' elseifeq ($(call isTargetOs, aix), true) # NOTE: The old build had the solution below. This should to be fixed in # configure instead.
# On AIX we have to prevent that we pick up the 'nm' version from the GNU binutils # which may be installed under /opt/freeware/bin. So better use an absolute path here! # NM=/usr/bin/nm
# The following lines create a list of vftable symbols to be filtered out of # the mapfile. Removing this line causes the linker to complain about too many # (> 64K) symbols, so the _guess_ is that this line is here to keep down the # number of exported symbols below that limit. # # Some usages of C++ lambdas require the vftable symbol of classes that use # the lambda type as a template parameter. The usage of those classes won't # link if their vftable symbols are removed. That's why there's an exception # for vftable symbols containing the string 'lambda'. # # A very simple example of a lambda usage that fails if the lambda vftable # symbols are missing in the mapfile: # # #include <functional> # std::function<void()> f = [](){}
else
$(error Unknown target OS $(OPENJDK_TARGET_OS) in JvmMapfile.gmk) endif
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of # cd && *.o, but this will result in very long command lines, which is # problematic on some platforms.
$(JVM_OUTPUTDIR)/symbols-objects: $(BUILD_LIBJVM_ALL_OBJS)
$(call LogInfo, Generating symbol list from object files)
$(CD) $(JVM_OUTPUTDIR)/objs && \
$(DUMP_SYMBOLS_CMD) | $(AWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u > $@
SYMBOLS_SRC += $(JVM_OUTPUTDIR)/symbols-objects
################################################################################ # Now concatenate all symbol lists into a single file and remove comments.
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.