aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2017-08-10 22:59:10 +0200
committerUros Bizjak <uros@gcc.gnu.org>2017-08-10 22:59:10 +0200
commite1769bdd4cef522ada32aec863feba41116b183a (patch)
treebfa44ea06ab428cb984cd7189bf283a48a7726bf /gcc/doc/invoke.texi
parentf18f68226c2abb77008da7bd0aef5d7ee905c4c6 (diff)
downloadgcc-e1769bdd4cef522ada32aec863feba41116b183a.zip
gcc-e1769bdd4cef522ada32aec863feba41116b183a.tar.gz
gcc-e1769bdd4cef522ada32aec863feba41116b183a.tar.bz2
re PR target/81708 (The x86 stack canary location should be customizable)
PR target/81708 * config/i386/i386.opt (mstack-protector-guard-symbol=): New option * config/i386/i386.c (ix86_stack_protect_guard): Use ix86_stack_protect_guard_symbol_str to generate varible declaration. * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-symbol= option. testsuite/ChangeLog: PR target/81708 * gcc.target/i386/stack-prot-sym.c: New test. From-SVN: r251040
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3753d8a..ec29f1d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1216,7 +1216,8 @@ See RS/6000 and PowerPC Options.
-mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
-malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
-mstack-protector-guard-reg=@var{reg} @gol
--mstack-protector-guard-offset=@var{offset} -mmitigate-rop @gol
+-mstack-protector-guard-offset=@var{offset} @gol
+-mstack-protector-guard-symbol=@var{symbol} -mmitigate-rop @gol
-mgeneral-regs-only -mcall-ms2sysv-xlogues}
@emph{x86 Windows Options}
@@ -22757,9 +22758,11 @@ The @option{-mno-compat-align-parm} option is the default.
@item -mstack-protector-guard=@var{guard}
@itemx -mstack-protector-guard-reg=@var{reg}
@itemx -mstack-protector-guard-offset=@var{offset}
+@itemx -mstack-protector-guard-symbol=@var{symbol}
@opindex mstack-protector-guard
@opindex mstack-protector-guard-reg
@opindex mstack-protector-guard-offset
+@opindex mstack-protector-guard-symbol
Generate stack protection code using canary at @var{guard}. Supported
locations are @samp{global} for global canary or @samp{tls} for per-thread
canary in the TLS block (the default with GNU libc version 2.4 or later).
@@ -22769,7 +22772,8 @@ With the latter choice the options
@option{-mstack-protector-guard-offset=@var{offset}} furthermore specify
which register to use as base register for reading the canary, and from what
offset from that base register. The default for those is as specified in the
-relevant ABI.
+relevant ABI. @option{-mstack-protector-guard-symbol=@var{symbol}} overrides
+the offset with a symbol reference to a canary in the TLS block.
@end table
@node RX Options