common/autoconf/toolchain.m4

changeset 2172
a0101c7abbb9
parent 1862
73494e6ff8e5
child 2186
5c86538f0b0d
child 2204
0e87966d7ff1
     1.1 --- a/common/autoconf/toolchain.m4	Wed Apr 04 17:15:47 2018 -0700
     1.2 +++ b/common/autoconf/toolchain.m4	Tue Apr 10 14:52:33 2018 -0700
     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?

mercurial