public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49541] New: [4.6/4.7 regression] TLS support partially broken in 64-bit mode
@ 2011-06-27  9:05 ebotcazou at gcc dot gnu.org
  2011-06-27  9:49 ` [Bug target/49541] " rguenth at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-06-27  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6/4.7 regression] TLS support partially broken in
                    64-bit mode
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ebotcazou@gcc.gnu.org
            Target: sparc-sun-solaris2.8


The new TLS support on SPARC/Solaris 8 is partially broken in 64-bit mode. 
This is visible with gcc.dg/tls/opt-12.c:

(botcazou@nile) /nile.build/botcazou/gcc-4.6/sparc-sun-solaris2.8 $ gcc/xgcc
-Bgcc -o opt-12 opt-12.c -fpic -O2 -pthread

(botcazou@nile) /nile.build/botcazou/gcc-4.6/sparc-sun-solaris2.8 $ gcc/xgcc
-Bgcc -o opt-12 opt-12.c -fpic -O2 -pthread -m64
Undefined                       first referenced
 symbol                             in file
__tls_get_addr                      /var/tmp//cc0nZy21.o
ld: fatal: Symbol referencing errors. No output written to opt-12
collect2: ld returned 1 exit status

This is with the Sun linker.  The difference between 32-bit and 64-bit mode is
that the driver inserts -L entries on the link line:

gcc/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o opt-12 gcc/crt1.o gcc/crti.o
/usr/ccs/lib/values-Xa.o gcc/crtbegin.o -Lgcc -L/usr/ccs/lib
/var/tmp//ccLfjSjm.o -lgcc -lgcc_eh -L/usr/lib/lwp -R/usr/lib/lwp -lpthread
-lthread -lc -lgcc -lgcc_eh -L/usr/lib/lwp -R/usr/lib/lwp -lpthread -lthread
-lc gcc/crtend.o gcc/crtn.o

gcc/collect2 -V -Y P,/usr/lib/sparcv9 -Qy -o opt-12 gcc/sparcv9/crt1.o
gcc/sparcv9/crti.o /usr/ccs/lib/sparcv9/values-Xa.o gcc/sparcv9/crtbegin.o
-Lgcc/sparcv9 -L/usr/ccs/lib/sparcv9 -L/lib/sparcv9 -L/usr/lib/sparcv9 -Lgcc
-L/usr/ccs/lib /var/tmp//ccMywo2Z.o -lgcc -lgcc_eh -L/usr/lib/lwp/64
-R/usr/lib/lwp/64 -lpthread -lthread -lc -lgcc -lgcc_eh -L/usr/lib/lwp/64
-R/usr/lib/lwp/64 -lpthread -lthread -lc gcc/sparcv9/crtend.o
gcc/sparcv9/crtn.o

The problematic one is /lib/sparcv9.  It causes /lib/sparcv9/libthread.so to be
seen before /usr/lib/lwp/sparcv9/libthread.so.  Now the latter provides the
missing symbol __tls_get_addr while the former doesn't (we have the same setup
with /lib/libthread.so and /usr/lib/lwp/libthread.so in 32-bit mode).

This is a regression in the sense that the testcase links with GCC 4.5.x.


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

end of thread, other threads:[~2011-07-18 12:15 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-27  9:05 [Bug target/49541] New: [4.6/4.7 regression] TLS support partially broken in 64-bit mode ebotcazou at gcc dot gnu.org
2011-06-27  9:49 ` [Bug target/49541] " rguenth at gcc dot gnu.org
2011-07-06  8:53 ` ebotcazou at gcc dot gnu.org
2011-07-06 14:07 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-13  9:21 ` ro at gcc dot gnu.org
2011-07-13 16:12 ` ebotcazou at gcc dot gnu.org
2011-07-13 17:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-13 17:59 ` ro at gcc dot gnu.org
2011-07-13 19:35 ` ebotcazou at gcc dot gnu.org
2011-07-14 17:09 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-14 17:38 ` ro at gcc dot gnu.org
2011-07-14 17:40 ` ro at gcc dot gnu.org
2011-07-15  9:34 ` ebotcazou at gcc dot gnu.org
2011-07-15  9:34 ` ebotcazou at gcc dot gnu.org
2011-07-15  9:40 ` ro at gcc dot gnu.org
2011-07-15 12:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-15 12:05 ` ro at gcc dot gnu.org
2011-07-18 12:10 ` ro at gcc dot gnu.org
2011-07-18 12:11 ` ro at gcc dot gnu.org
2011-07-18 12:15 ` ro at gcc dot gnu.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).