summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorjiwang <jiwang@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-29 11:47:48 +0000
committerjiwang <jiwang@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-29 11:47:48 +0000
commit783f362b434198d2e78c390f2de49c676f241559 (patch)
tree58ea11f59eb7d734feba66f5e7ad492c76b250ab /gcc/calls.c
parenta05069906de6b07ced274c83057cd94d5d3ed99e (diff)
downloadgcc-783f362b434198d2e78c390f2de49c676f241559.tar.gz
[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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242955 138bc75d-0d04-0410-961f-82ee72b054a4
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 c916e0725dc..21385ce0e12 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;