diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2018-04-24 22:15:51 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2018-04-24 15:15:51 -0700 |
commit | ffc2fc06e3cd63d06943baab93c9f8e39a28b14d (patch) | |
tree | cc73e3f6d3787c7b0b579ca3ae0891b40a492611 /libgcc | |
parent | e59133c36c1733ccce20e21b4358418f450f23ee (diff) | |
download | gcc-ffc2fc06e3cd63d06943baab93c9f8e39a28b14d.zip gcc-ffc2fc06e3cd63d06943baab93c9f8e39a28b14d.tar.gz gcc-ffc2fc06e3cd63d06943baab93c9f8e39a28b14d.tar.bz2 |
x86: Update __CET__ check
__CET__ has been changed by revision 259522:
commit d59cfa9a4064339cf2bd2da828c4c133f13e57f0
Author: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Apr 20 13:30:13 2018 +0000
Define __CET__ for -fcf-protection and remove -mibt
to
(__CET__ & 1) != 0: -fcf-protection=branch or -fcf-protection=full
(__CET__ & 2) != 0: -fcf-protection=return or -fcf-protection=full
We should check (__CET__ & 2) != 0 for shadow stack.
libgcc/
* config/i386/linux-unwind.h: Add (__CET__ & 2) != 0 check
when including "config/i386/shadow-stack-unwind.h".
libitm/
* config/x86/sjlj.S (_ITM_beginTransaction): Add
(__CET__ & 2) != 0 check for shadow stack.
(GTM_longjmp): Likewise.
From-SVN: r259621
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/config/i386/linux-unwind.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 86003ea..8d413b5 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,10 @@ 2018-04-24 H.J. Lu <hongjiu.lu@intel.com> + * config/i386/linux-unwind.h: Add (__CET__ & 2) != 0 check + when including "config/i386/shadow-stack-unwind.h". + +2018-04-24 H.J. Lu <hongjiu.lu@intel.com> + * configure: Regenerated. 2018-04-20 Michael Meissner <meissner@linux.ibm.com> diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h index f1f5233..ea838e4 100644 --- a/libgcc/config/i386/linux-unwind.h +++ b/libgcc/config/i386/linux-unwind.h @@ -23,7 +23,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ /* Unwind shadow stack for -fcf-protection -mshstk. */ -#if defined __SHSTK__ && defined __CET__ +#if defined __SHSTK__ && defined __CET__ && (__CET__ & 2) != 0 # include "config/i386/shadow-stack-unwind.h" #endif |