public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/29838]  New: -fstack-protector shouldn't use TLS in freestanding mode
@ 2006-11-15  1:14 samuel dot thibault at ens-lyon dot org
  2006-11-15  1:17 ` [Bug c/29838] " samuel dot thibault at ens-lyon dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2006-11-15  1:14 UTC (permalink / raw)
  To: gcc-bugs

Hi,

On some architectures, when given -fstack-protector (which is the default on
ubuntu), gcc generates a TLS reference for the stack guard. For instance, on
linux x86 with a fairly recent version of glibc:

echo 'void f (void) { volatile char a[8]; a[3]; }' | gcc -S -x c -O2
-fstack-protector - -o -

generates a %gs:0x14 reference.

In freestanding mode, this poses problem because the target (typically an OS
kernel) does not necessarily have TLS.  In such case, gcc should default back
to referencing __stack_chk_guard.

Samuel


-- 
           Summary: -fstack-protector shouldn't use TLS in freestanding mode
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: samuel dot thibault at ens-lyon dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29838


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <bug-29838-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2015-01-08 17:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-15  1:14 [Bug c/29838] New: -fstack-protector shouldn't use TLS in freestanding mode samuel dot thibault at ens-lyon dot org
2006-11-15  1:17 ` [Bug c/29838] " samuel dot thibault at ens-lyon dot org
2006-11-15  2:50 ` [Bug target/29838] " pinskia at gcc dot gnu dot org
2006-11-15  9:33 ` samuel dot thibault at ens-lyon dot org
2006-11-15 10:11 ` tschwinge at gnu dot org
2006-11-15 10:23 ` jakub at gcc dot gnu dot org
2006-11-15 10:30 ` samuel dot thibault at ens-lyon dot org
2006-11-15 10:38 ` jakub at gcc dot gnu dot org
2006-11-15 10:41 ` jakub at gcc dot gnu dot org
2006-11-15 11:01 ` samuel dot thibault at ens-lyon dot org
2006-12-15 19:30 ` tschwinge at gnu dot org
     [not found] <bug-29838-4@http.gcc.gnu.org/bugzilla/>
2015-01-08 17:12 ` egall at gwmail dot gwu.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).