diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 280b92c40ca41aaed9bd119949e2d338f2637688..c2215ca7f4e4b4b76a0d4588f0853cf01e8e56cd 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -3912,7 +3912,7 @@ fi #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1500960571 +DATE_WHEN_GENERATED=1515659624 ############################################################################### # @@ -30178,9 +30178,10 @@ $as_echo "$supports" >&6; } LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " fi if test "x$OPENJDK_TARGET_OS" = xlinux; then - # And since we now know that the linker is gnu, then add -z defs, to forbid - # undefined symbols in object files. - LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" + # And since we now know that the linker is gnu, then add: + # -z defs, to forbid undefined symbols in object files + # -z noexecstack, to mark stack regions as non-executable + LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack" if test "x$DEBUG_LEVEL" = "xrelease"; then # When building release libraries, tell the linker optimize them. # Should this be supplied to the OSS linker as well? diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index 1af8fa33d8775d403e7086c018db0ce4960f3710..f8f32a3f850882bd1bc03d7660edeb4c78c22a0c 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2018, 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 @@ -1211,9 +1211,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " fi if test "x$OPENJDK_TARGET_OS" = xlinux; then - # And since we now know that the linker is gnu, then add -z defs, to forbid - # undefined symbols in object files. - LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" + # And since we now know that the linker is gnu, then add: + # -z defs, to forbid undefined symbols in object files + # -z noexecstack, to mark stack regions as non-executable + LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack" if test "x$DEBUG_LEVEL" = "xrelease"; then # When building release libraries, tell the linker optimize them. # Should this be supplied to the OSS linker as well?