common/autoconf/flags.m4

changeset 2226
d5dd14b37ea5
parent 2225
fe7df3d2f5ae
child 2298
d7057bcda329
     1.1 --- a/common/autoconf/flags.m4	Fri May 25 10:37:07 2018 +0100
     1.2 +++ b/common/autoconf/flags.m4	Thu May 31 03:58:03 2018 -0400
     1.3 @@ -640,9 +640,10 @@
     1.4          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
     1.5        fi
     1.6        if test "x$OPENJDK_TARGET_OS" = xlinux; then
     1.7 -        # And since we now know that the linker is gnu, then add -z defs, to forbid
     1.8 -        # undefined symbols in object files.
     1.9 -        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
    1.10 +        # And since we now know that the linker is gnu, then add:
    1.11 +        #   -z defs, to forbid undefined symbols in object files
    1.12 +        #   -z noexecstack, to mark stack regions as non-executable
    1.13 +        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
    1.14          if test "x$DEBUG_LEVEL" = "xrelease"; then
    1.15            # When building release libraries, tell the linker optimize them.
    1.16            # Should this be supplied to the OSS linker as well?

mercurial