8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack jdk8u162-b33

Thu, 01 Feb 2018 17:53:51 +0000

author
dbuck
date
Thu, 01 Feb 2018 17:53:51 +0000
changeset 2248
f8f11c618554
parent 2242
5a80fc5b9697
child 2249
a916a62cdb9c

8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack
Reviewed-by: dholmes, erikj

common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/toolchain.m4 file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/generated-configure.sh	Mon Jan 22 13:28:40 2018 -0800
     1.2 +++ b/common/autoconf/generated-configure.sh	Thu Feb 01 17:53:51 2018 +0000
     1.3 @@ -3776,7 +3776,7 @@
     1.4  
     1.5  
     1.6  #
     1.7 -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     1.8 +# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     1.9  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    1.10  #
    1.11  # This code is free software; you can redistribute it and/or modify it
    1.12 @@ -3912,7 +3912,7 @@
    1.13  #CUSTOM_AUTOCONF_INCLUDE
    1.14  
    1.15  # Do not change or remove the following line, it is needed for consistency checks:
    1.16 -DATE_WHEN_GENERATED=1501170108
    1.17 +DATE_WHEN_GENERATED=1517507181
    1.18  
    1.19  ###############################################################################
    1.20  #
    1.21 @@ -30178,9 +30178,10 @@
    1.22          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
    1.23        fi
    1.24        if test "x$OPENJDK_TARGET_OS" = xlinux; then
    1.25 -        # And since we now know that the linker is gnu, then add -z defs, to forbid
    1.26 -        # undefined symbols in object files.
    1.27 -        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
    1.28 +        # And since we now know that the linker is gnu, then add:
    1.29 +        #   -z defs, to forbid undefined symbols in object files
    1.30 +        #   -z noexecstack, to mark stack regions as non-executable
    1.31 +        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
    1.32          if test "x$DEBUG_LEVEL" = "xrelease"; then
    1.33            # When building release libraries, tell the linker optimize them.
    1.34            # Should this be supplied to the OSS linker as well?
     2.1 --- a/common/autoconf/toolchain.m4	Mon Jan 22 13:28:40 2018 -0800
     2.2 +++ b/common/autoconf/toolchain.m4	Thu Feb 01 17:53:51 2018 +0000
     2.3 @@ -1,5 +1,5 @@
     2.4  #
     2.5 -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     2.6 +# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     2.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8  #
     2.9  # This code is free software; you can redistribute it and/or modify it
    2.10 @@ -1211,9 +1211,10 @@
    2.11          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
    2.12        fi
    2.13        if test "x$OPENJDK_TARGET_OS" = xlinux; then
    2.14 -        # And since we now know that the linker is gnu, then add -z defs, to forbid
    2.15 -        # undefined symbols in object files.
    2.16 -        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
    2.17 +        # And since we now know that the linker is gnu, then add:
    2.18 +        #   -z defs, to forbid undefined symbols in object files
    2.19 +        #   -z noexecstack, to mark stack regions as non-executable
    2.20 +        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
    2.21          if test "x$DEBUG_LEVEL" = "xrelease"; then
    2.22            # When building release libraries, tell the linker optimize them.
    2.23            # Should this be supplied to the OSS linker as well?

mercurial