diff options
author | Pavel Chupin <pavel.v.chupin@intel.com> | 2012-08-03 12:37:21 +0400 |
---|---|---|
committer | Pavel Chupin <pavel.v.chupin@intel.com> | 2012-09-03 18:14:58 +0400 |
commit | a3bbecce2c41db5752beb324939b63c5dfb7112c (patch) | |
tree | bb3d940cd372dc830c2f626d6290e05256c3853e /gcc-4.4.3/gcc/config/i386/i386.md | |
parent | 329ca6fa5d9972ad6dad8387036b4dbe9cfa1f27 (diff) | |
download | toolchain_gcc-a3bbecce2c41db5752beb324939b63c5dfb7112c.tar.gz toolchain_gcc-a3bbecce2c41db5752beb324939b63c5dfb7112c.tar.bz2 toolchain_gcc-a3bbecce2c41db5752beb324939b63c5dfb7112c.zip |
Backport from trunk r189840 and r187586: stack-protector fixes for 4.4.3
2012-07-25 Sergey Melnikov <sergey.melnikov@intel.com>
* config/i386/i386.md (stack_protect_set): Disable the pattern
for Android since Android libc (bionic) does not provide random
value for stack protection guard at gs:0x14. Guard value
will be provided from external symbol (default implementation).
(stack_protect_set_<mode>): Likewise.
(stack_protect_test): Likewise.
(stack_protect_test_<mode>): Likewise.
* gcc/defaults.h: Define macro TARGET_HAS_BIONIC to 0 - target
* does
not have Bionic by default
* config/linux.h: Redefine macro TARGET_HAS_BIONIC to
* (OPTION_BIONIC)
Macro OPTION_BIONIC is defined in this file and provides Bionic
accessibility status
2012-05-16 Igor Zamyatin <igor.zamyatin@intel.com>
* configure.ac: Stack protector enabling for Android targets.
* configure: Regenerate.
Change-Id: I878562dd0bed8069011246c29c1ac6ce1c353644
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'gcc-4.4.3/gcc/config/i386/i386.md')
-rw-r--r-- | gcc-4.4.3/gcc/config/i386/i386.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc-4.4.3/gcc/config/i386/i386.md b/gcc-4.4.3/gcc/config/i386/i386.md index 7989c31db..712df1071 100644 --- a/gcc-4.4.3/gcc/config/i386/i386.md +++ b/gcc-4.4.3/gcc/config/i386/i386.md @@ -21926,7 +21926,7 @@ (define_expand "stack_protect_set" [(match_operand 0 "memory_operand" "") (match_operand 1 "memory_operand" "")] - "" + "!TARGET_HAS_BIONIC" { #ifdef TARGET_THREAD_SSP_OFFSET if (TARGET_64BIT) @@ -21949,7 +21949,7 @@ (unspec:SI [(match_operand:SI 1 "memory_operand" "m")] UNSPEC_SP_SET)) (set (match_scratch:SI 2 "=&r") (const_int 0)) (clobber (reg:CC FLAGS_REG))] - "" + "!TARGET_HAS_BIONIC" "mov{l}\t{%1, %2|%2, %1}\;mov{l}\t{%2, %0|%0, %2}\;xor{l}\t%2, %2" [(set_attr "type" "multi")]) @@ -21992,7 +21992,7 @@ [(match_operand 0 "memory_operand" "") (match_operand 1 "memory_operand" "") (match_operand 2 "" "")] - "" + "!TARGET_HAS_BIONIC" { rtx flags = gen_rtx_REG (CCZmode, FLAGS_REG); ix86_compare_op0 = operands[0]; |