This failure with Sun as/ld http://gcc.gnu.org/ml/gcc-testresults/2006-11/msg00764.html is of the form:
ld: fatal: relocation error: R_SPARC_HI22: file /var/tmp//cc8eBELF.o: symbol base: relocation illegal for TLS symbol It's a bug in Sun as, it doesn't switch section between .tbss and .bss: hikaru% cat v.s .section ".tbss",#alloc,#write,#tls .align 4 .type threadbase, #tls_object .size threadbase, 4 threadbase: .skip 4 .local base .common base,4,4 hikaru% as -o v.o v.s hikaru% objdump --syms v.o v.o: file format elf32-sparc SYMBOL TABLE: 00000000 l d .tbss 00000000 .tbss 00000004 l .tbss 00000004 base 00000000 l .tbss 00000004 threadbase hikaru% cat v.s .section ".tdata",#alloc,#write,#tls .align 4 .type threadbase, #tls_object .size threadbase, 4 threadbase: .skip 4 .local base .common base,4,4 hikaru% as -o v.o v.s hikaru% objdump --syms v.o v.o: file format elf32-sparc SYMBOL TABLE: 00000000 l d .bss 00000000 .bss 00000000 l d .tdata 00000000 .tdata 00000000 l O .bss 00000004 base 00000000 l .tdata 00000004 threadbase -- Summary: libgomp.c++/ctor-9.C failure Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ebotcazou at gcc dot gnu dot org GCC build triplet: sparc-sun-solaris2.10 GCC host triplet: sparc-sun-solaris2.10 GCC target triplet: sparc-sun-solaris2.10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29987