[Bug target/81708] The x86 stack canary location should be customizable
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 9 08:51:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 41955
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41955&action=edit
patch that introduces mstack-protector-guard-symbol=
This patch can be used to override TLS offset with a symbol.
gcc.target/i386/stack-prot-guard.c compiles to (-O2 -fstack-protector-all
-mstack-protector-guard-symbol=symbol_name):
f:
subq $24, %rsp
movq %fs:symbol_name(%rip), %rax
movq %rax, 8(%rsp)
xorl %eax, %eax
movq 8(%rsp), %rax
xorq %fs:symbol_name(%rip), %rax
jne .L5
addq $24, %rsp
ret
More information about the Gcc-bugs
mailing list