diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-06-27 10:03:26 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-06-27 10:03:26 +0200 |
commit | 7ce918c59e949e79c05c730c8720feea0442b4d9 (patch) | |
tree | b8b719d2e127252b7a6819c53db9212636451351 /gcc/targhooks.c | |
parent | 7d69de618e732d343228a07d797a30e39a6363f4 (diff) | |
download | gcc-7ce918c59e949e79c05c730c8720feea0442b4d9.zip gcc-7ce918c59e949e79c05c730c8720feea0442b4d9.tar.gz gcc-7ce918c59e949e79c05c730c8720feea0442b4d9.tar.bz2 |
targhooks.c (default_hidden_stack_protect_fail): Fall back to default_external_stack_protect_fail if...
* 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.
From-SVN: r101349
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 ec374c6..0664f2c 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" |