[AArch64] Add support for system register based stack protector canary access

Programming / Compilers / GCC - ramana [138bc75d-0d04-0410-961f-82ee72b054a4] - 18 January 2019 10:32 EST

2019-01-18 Ramana Radhakrishnan

- config/aarch64/aarch64-opts.h (enum stack_protector_guard): New
- config/aarch64/aarch64.c (aarch64_override_options_internal): Handle and put in error checks for stack protector guard options. (aarch64_stack_protect_guard): New. (TARGET_STACK_PROTECT_GUARD): Define.
- config/aarch64/aarch64.md (UNSPEC_SSP_SYSREG): New. (reg_stack_protect_address): New. (stack_protect_set): Adjust for SSP_GLOBAL. (stack_protect_test): Likewise.
- config/aarch64/aarch64.opt (-mstack-protector-guard-reg): New. (-mstack-protector-guard): Likewise. (-mstack-protector-guard-offset): Likewise.

359c1bf35e3 [AArch64] Add support for system register based stack protector canary access
gcc/ChangeLog | 15 +++++++++
gcc/config/aarch64/aarch64-opts.h | 6 ++++
gcc/config/aarch64/aarch64.c | 51 +++++++++++++++++++++++++++++++
gcc/config/aarch64/aarch64.md | 64 ++++++++++++++++++++++++++++++++++++---
gcc/config/aarch64/aarch64.opt | 30 ++++++++++++++++++
gcc/doc/invoke.texi | 40 +++++++++++++++++++++++-
6 files changed, 201 insertions(+), 5 deletions(-)

Upstream: gcc.gnu.org


  • Share