public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/38118]  New: gcc emits non-TLS data as TLS on Solaris 11/SPARC
@ 2008-11-14 15:54 ro at gcc dot gnu dot org
  2008-11-14 19:10 ` [Bug target/38118] " ebotcazou at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu dot org @ 2008-11-14 15:54 UTC (permalink / raw)
  To: gcc-bugs

While trying to build current mainline with Sun as and GNU ld 2.19 on
sparc-sun-solaris2.11, libgomp failed to link with the following error:

/vol/gcc/lib/gld-2.19: gomp_thread_attr: TLS reference in .libs/team.o
mismatches non-TLS reference in .libs/env.o
.libs/team.o: could not read symbols: Bad value

Further investigation revealed that this is due to a gcc bug: consider the
following testcase:

__thread int tsd;
int non_tsd;

ro@galeras 1510 > ./xgcc -B./ -c ~/tls.c 
ro@galeras 1511 > readelf -s tls.o|grep tsd
     3: 00000004     4 TLS     GLOBAL DEFAULT  COM non_tsd
     4: 00000000     4 TLS     GLOBAL DEFAULT    2 tsd
ro@galeras 1512 > /opt/onstudio12/SUNWspro/bin/cc -c ~/tls.c 
ro@galeras 1513 > readelf -s tls.o|grep tsd
     9: 00000004     4 TLS     GLOBAL DEFAULT  COM tsd
    10: 00000004     4 OBJECT  GLOBAL DEFAULT  COM non_tsd

I.e. if compiled with gcc, both objects are marked as tls, while Sun Studio 12
cc correctly only marks tsd as TLS.

The same bug exists in gcc 4.3, 4.2 and 4.1.


-- 
           Summary: gcc emits non-TLS data as TLS on Solaris 11/SPARC
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.11
  GCC host triplet: sparc-sun-solaris2.11
GCC target triplet: sparc-sun-solaris2.11


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-06 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-38118-4@http.gcc.gnu.org/bugzilla/>
2011-01-06 19:19 ` [Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC ro at gcc dot gnu.org
2008-11-14 15:54 [Bug target/38118] New: " ro at gcc dot gnu dot org
2008-11-14 19:10 ` [Bug target/38118] " ebotcazou at gcc dot gnu dot org
2008-11-17 14:26 ` ro at techfak dot uni-bielefeld dot de
2008-11-18  8:25 ` ebotcazou at gcc dot gnu dot org
2008-11-18  9:40 ` jakub at gcc dot gnu dot org
2010-03-24 18:50 ` ro at gcc dot gnu dot org

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).