[Bug target/85044] ENDBR is missing in ix86_trampoline_init
hjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 27 17:19:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85044
--- Comment #3 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Tue Mar 27 17:18:51 2018
New Revision: 258897
URL: https://gcc.gnu.org/viewcvs?rev=258897&root=gcc&view=rev
Log:
i386: Insert ENDBR to trampoline for -fcf-protection=branch -mibt
When -fcf-protection=branch -mibt are used, we need to insert ENDBR
to trampoline. TRAMPOLINE_SIZE is creased by 4 bytes to accommodate
4-byte ENDBR instruction.
gcc/
PR target/85044
* config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
-fcf-protection=branch -mibt.
* config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
gcc/testsuite/
PR target/85044
* gcc.target/i386/pr85044.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr85044.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.h
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list