This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81708] The x86 stack canary location should be customizable
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Aug 2017 08:54:23 +0000
- Subject: [Bug target/81708] The x86 stack canary location should be customizable
- Auto-submitted: auto-generated
- References: <bug-81708-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to H. Peter Anvin from comment #8)
> How about simply letting the user enter an assembly expression of neither of
> the standard ABI options are suitable? Also, shouldn't the user space
> default on 64 bits be an offset into the TLS using %fs, or is there
> something magic about how the kernel is compiled that changes it to %gs:?
-mcmodel=kernel switches TLS reg to %gs.
You can use mstack-protector-guard-reg=%gs with other code models.