提交 8b9762e2 编写于 作者: D dbuck

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

Reviewed-by: dholmes, erikj
上级 a22f98c9
...@@ -3776,7 +3776,7 @@ fi ...@@ -3776,7 +3776,7 @@ fi
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -3912,7 +3912,7 @@ fi ...@@ -3912,7 +3912,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1521483882 DATE_WHEN_GENERATED=1523388104
############################################################################### ###############################################################################
# #
...@@ -30178,9 +30178,10 @@ $as_echo "$supports" >&6; } ...@@ -30178,9 +30178,10 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
fi fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
# And since we now know that the linker is gnu, then add -z defs, to forbid # And since we now know that the linker is gnu, then add:
# undefined symbols in object files. # -z defs, to forbid undefined symbols in object files
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" # -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 if test "x$DEBUG_LEVEL" = "xrelease"; then
# When building release libraries, tell the linker optimize them. # When building release libraries, tell the linker optimize them.
# Should this be supplied to the OSS linker as well? # Should this be supplied to the OSS linker as well?
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -1211,9 +1211,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], ...@@ -1211,9 +1211,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
fi fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
# And since we now know that the linker is gnu, then add -z defs, to forbid # And since we now know that the linker is gnu, then add:
# undefined symbols in object files. # -z defs, to forbid undefined symbols in object files
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" # -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 if test "x$DEBUG_LEVEL" = "xrelease"; then
# When building release libraries, tell the linker optimize them. # When building release libraries, tell the linker optimize them.
# Should this be supplied to the OSS linker as well? # Should this be supplied to the OSS linker as well?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册