[Bug target/81708] The x86 stack canary location should be customizable
aoliva at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 19 15:41:55 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |aoliva at gcc dot gnu.org
Resolution|FIXED |---
--- Comment #15 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Uroš,
stack-prot-sym.c fails on ia32 with PIC/PIE: the address/value of my_guard is
loaded from the GOT, instead of appearing as %gs:my_guard.
After being confused by the expectation that my_guard should be a LE TLS
symbol, I'm coming to the conclusion that my expectation was incorrect, and it
is indeed supposed to be a plain offset, so the code is correct, if not as
efficient as on PDC. Does that sound right?
I'm undecided as to whether avoiding the GOT reference, and requiring the
symbol to be usable as a link-time constant, would be desirable/doable.
Thoughts?
More information about the Gcc-bugs
mailing list