aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2016-11-29 11:47:48 +0000
committerJiong Wang <jiwang@gcc.gnu.org>2016-11-29 11:47:48 +0000
commit87a5dc2da0ae66285afa894b4dca847c87c0302b (patch)
tree58ea11f59eb7d734feba66f5e7ad492c76b250ab /gcc/calls.c
parent11edabc2dfb9274445d697eff2bafde3abdefa1f (diff)
downloadgcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.zip
gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.tar.gz
gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.tar.bz2
[Patch] New hook TARGET_STACK_PROTECT_RUNTIME_ENABLED_P to disable SSP runtime
gcc/ * target.def (stack_protect_runtime_enabled_p): New. * function.c (expand_function_end): Guard stack_protect_epilogue with targetm.stack_protect_runtime_enabled_p. * cfgexpand.c (pass_expand::execute): Likewise. * calls.c (expand_call): Likewise. * doc/tm.texi.in (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P): Add it. * doc/tm.texi: Regenerate. From-SVN: r242955
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index c916e07..21385ce 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -3083,7 +3083,9 @@ expand_call (tree exp, rtx target, int ignore)
if (pass && (flags & ECF_MALLOC))
start_sequence ();
- if (pass == 0 && crtl->stack_protect_guard)
+ if (pass == 0
+ && crtl->stack_protect_guard
+ && targetm.stack_protect_runtime_enabled_p ())
stack_protect_epilogue ();
adjusted_args_size = args_size;