diff -r fe7df3d2f5ae -r d5dd14b37ea5 common/autoconf/flags.m4 --- a/common/autoconf/flags.m4 Fri May 25 10:37:07 2018 +0100 +++ b/common/autoconf/flags.m4 Thu May 31 03:58:03 2018 -0400 @@ -640,9 +640,10 @@ 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?