From d30706afcb82c96a07eb4ffe538b6cbe46caf4af Mon Sep 17 00:00:00 2001 From: Morgan Davies Date: Fri, 15 Nov 2019 15:15:09 +0000 Subject: [PATCH] Set default load address for launchers on s390x Sets the load address of the launchers to 0x60000 on zlinux 64 systems. This enables compressed references with heaps larger then 1.8GB Signed-off-by: Morgan Davies --- make/launcher/LauncherCommon.gmk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/make/launcher/LauncherCommon.gmk b/make/launcher/LauncherCommon.gmk index ac355a44a87..2f7f312924f 100644 --- a/make/launcher/LauncherCommon.gmk +++ b/make/launcher/LauncherCommon.gmk @@ -23,6 +23,11 @@ # questions. # +# =========================================================================== +# (c) Copyright IBM Corp. 2019, 2019 All Rights Reserved +# =========================================================================== +# + include JdkNativeCompilation.gmk ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,/../lib/jli) @@ -93,6 +98,16 @@ JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest SetupBuildLauncher = $(NamedParamsMacroTemplate) define SetupBuildLauncherBody # Setup default values (unless overridden) + + ifeq ($(OPENJDK_TARGET_OS), linux) + # Set the image base address for zLinux 64 to 0x60000 for launchers, + # allows compressedRefsShift to be 0 when -Xmx is set to 2040m or more. + # / RTC PR 100052 + ifeq ($(OPENJDK_TARGET_CPU), s390x) + $1_LDFLAGS += -Wl,-Ttext-segment=0x60000 + endif + endif + ifeq ($$($1_OPTIMIZATION), ) $1_OPTIMIZATION := LOW endif