summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-04-29 04:52:46 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-04-29 04:53:02 -0700
commit9be3bb2c0a258fd6a7d3d05d232a21930c757d3c (patch)
tree9ef8c3abbb149bc351e1b1f09038177c0240f003 /gcc/doc
parent668d8f3c0c61905bc69a1c73f16fa4fa6273db2a (diff)
x86: Allow -fcf-protection with external thunk
Allow -fcf-protection with external thunk since the external thunk can be made compatible with -fcf-protection. gcc/ PR target/93654 * config/i386/i386-options.c (ix86_set_indirect_branch_type): Allow -fcf-protection with -mindirect-branch=thunk-extern and -mfunction-return=thunk-extern. * doc/invoke.texi: Update notes for -fcf-protection=branch with -mindirect-branch=thunk-extern and -mindirect-return=thunk-extern. gcc/testsuite/ PR target/93654 * gcc.target/i386/pr93654.c: New test.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index fed38e88ae5..5bb7d94833e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -30097,9 +30097,9 @@ Note that @option{-mcmodel=large} is incompatible with
@option{-mindirect-branch=thunk-extern} since the thunk function may
not be reachable in the large code model.
-Note that @option{-mindirect-branch=thunk-extern} is incompatible with
-@option{-fcf-protection=branch} since the external thunk cannot be modified
-to disable control-flow check.
+Note that @option{-mindirect-branch=thunk-extern} is compatible with
+@option{-fcf-protection=branch} since the external thunk can be made
+to enable control-flow check.
@item -mfunction-return=@var{choice}
@opindex mfunction-return
@@ -30112,6 +30112,10 @@ object file. You can control this behavior for a specific function by
using the function attribute @code{function_return}.
@xref{Function Attributes}.
+Note that @option{-mindirect-return=thunk-extern} is compatible with
+@option{-fcf-protection=branch} since the external thunk can be made
+to enable control-flow check.
+
Note that @option{-mcmodel=large} is incompatible with
@option{-mfunction-return=thunk} and
@option{-mfunction-return=thunk-extern} since the thunk function may