1.1 --- a/common/autoconf/toolchain.m4 Mon Jan 22 13:28:40 2018 -0800 1.2 +++ b/common/autoconf/toolchain.m4 Thu Feb 01 17:53:51 2018 +0000 1.3 @@ -1,5 +1,5 @@ 1.4 # 1.5 -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 1.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 # 1.9 # This code is free software; you can redistribute it and/or modify it 1.10 @@ -1211,9 +1211,10 @@ 1.11 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 1.12 fi 1.13 if test "x$OPENJDK_TARGET_OS" = xlinux; then 1.14 - # And since we now know that the linker is gnu, then add -z defs, to forbid 1.15 - # undefined symbols in object files. 1.16 - LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 1.17 + # And since we now know that the linker is gnu, then add: 1.18 + # -z defs, to forbid undefined symbols in object files 1.19 + # -z noexecstack, to mark stack regions as non-executable 1.20 + LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack" 1.21 if test "x$DEBUG_LEVEL" = "xrelease"; then 1.22 # When building release libraries, tell the linker optimize them. 1.23 # Should this be supplied to the OSS linker as well?