diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-27 08:03:26 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-27 08:03:26 +0000 |
commit | c99ffbd2f6118d0584182a1bdbbcff31dd8c2f58 (patch) | |
tree | b8b719d2e127252b7a6819c53db9212636451351 /gcc/targhooks.c | |
parent | f1a0edffe07f4420fd63da807ccc758b8c4ebe35 (diff) | |
download | gcc-c99ffbd2f6118d0584182a1bdbbcff31dd8c2f58.tar.gz |
* targhooks.c (default_hidden_stack_protect_fail): Fall back to
default_external_stack_protect_fail if visibility is not supported
or not flag_pic.
* config/i386/i386.c (ix86_stack_protect_fail): New function.
(TARGET_STACK_PROTECT_FAIL): Define.
* config/i386/i386.md (stack_protect_si): Change CLOBBER into
SET to zero.
(stack_protect_di): Likewise. Use %k2 instead of %2 to avoid
invalid instruction xorl %rax, %rax.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index ec374c6593a..0664f2cfed6 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -380,9 +380,15 @@ default_external_stack_protect_fail (void) tree default_hidden_stack_protect_fail (void) { +#ifndef HAVE_GAS_HIDDEN + return default_external_stack_protect_fail (); +#else tree t = stack_chk_fail_decl; - if (stack_chk_fail_decl == NULL_TREE) + if (!flag_pic) + return default_external_stack_protect_fail (); + + if (t == NULL_TREE) { t = build_function_type_list (void_type_node, NULL_TREE); t = build_decl (FUNCTION_DECL, @@ -402,6 +408,7 @@ default_hidden_stack_protect_fail (void) } return build_function_call_expr (t, NULL_TREE); +#endif } #include "gt-targhooks.h" |