https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
--- Comment #16 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Alexandre Oliva from comment #15) > 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? The current implementation was implemented specifically for linux, as requested in Comment #0, without any other usages in mind. Also, I'm not deeply familiar with the details of symbol linking, so perhaps HJ can help here.