https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121911
Bug ID: 121911
Summary: x86-64: -mstack-protector-guard=global should respect
symbol visibility
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: fw at gcc dot gnu.org
Target Milestone: ---
With -mstack-protector-guard=global, GCC generates a non-relaxable instruction
sequence for the __stack_chk_guard access. It does not honor that
__stack_chk_guard is declared as hidden, either.
It would be nice if we had some stack protector variant that does not have a
TCB dependency and that does not involve a GOT indirection. This could either
use a local/hidden symbol for the guard value, or use the address in the GOT
directly as the canary value.