This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, Android] Runtime stack protector enabling for Android target


Hi!

Since this change for stack-protector enabling hurts mingw compiler
(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53980 and
http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00638.html) we'd like to
make change more general.
Please see new patch in attachment.
Tested in android environment(x86_64-*-linux-android), also
bootstrapped and regtested on x86_64-unknown-linux-gnu and i686-linux.
Also mingw bootstrap was checked.
Ok for trunk?

Thanks,
Igor


Changelog:

2012-07-23 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

Attachment: patch-stack-protector-3_target_bionic.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]