diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2017-08-08 18:48:46 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2017-08-08 18:48:46 +0200 |
commit | d5bf81b30f7d3faf58d52784013749ca0f9f980f (patch) | |
tree | b5449885acc699eefc6d35b3d55189c4e773106b /gcc/testsuite | |
parent | 7d27b70bd861d6b83a6821e3fb4205e19a365310 (diff) | |
download | gcc-d5bf81b30f7d3faf58d52784013749ca0f9f980f.zip gcc-d5bf81b30f7d3faf58d52784013749ca0f9f980f.tar.gz gcc-d5bf81b30f7d3faf58d52784013749ca0f9f980f.tar.bz2 |
re PR target/81708 (The x86 stack canary location should be customizable)
PR target/81708
* config/i386/i386.opt (mstack-protector-guard-reg=): New option
(mstack-protector-guard-offset=): Ditto.
* config/i386/i386.c (ix86_option_override): Handle
-mstack-protector-guard-reg= and -mstack-protector-guard-offset=
options.
(ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
ix86_stack_protect_guard_offset variables.
(TARGET_STACK_PROTECT_GUARD): Always define.
* doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
and -mstack-protector-guard-offset= options.
testsuite/ChangeLog:
PR target/81708
* gcc.target/i386/stack-prot-guard.c: New test.
From-SVN: r250965
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/stack-prot-guard.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c9742df..2ec22e8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-08-08 Uros Bizjak <ubizjak@gmail.com> + + PR target/81708 + * gcc.target/i386/stack-prot-guard.c: New test. + 2017-08-08 Tamar Christina <tamar.christina@arm.com> * gcc.target/aarch64/xorsign.c: New. diff --git a/gcc/testsuite/gcc.target/i386/stack-prot-guard.c b/gcc/testsuite/gcc.target/i386/stack-prot-guard.c new file mode 100644 index 0000000..120ef3c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/stack-prot-guard.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=tls -mstack-protector-guard-reg=gs -mstack-protector-guard-offset=0x3038" } */ + +void f(void) { } + +/* { dg-final { scan-assembler "gs:12344" } } */ |