------- Comment #5 from ro at gcc dot gnu dot org  2010-01-26 15:35 -------
I've found that the problem doesn't occur when assembler patch 118683-03 is
installed.  If I compare the relocations produced by as from patch 118683-02
with
those produced by patch 118683-03, I find some differences (elfdump -r output):

---
/vol/gcc/obj/gcc-4.5.0-20100107/10-gcc/sparc-sun-solaris2.10/libgomp/testsuite/ctor-5.elfdump-r
    2010-01-26 16:19:54.304447900 +0100
+++ ctor-5.elfdump-r    2010-01-26 16:19:48.584176600 +0100
@@ -21,10 +21,10 @@
   R_SPARC_LO10                   0x90          0  .rela.text     _ZN1B5countE
   R_SPARC_HI22                   0xc4          0  .rela.text    
_ZN1B8expectedE
   R_SPARC_LO10                   0xc8          0  .rela.text    
_ZN1B8expectedE
-  R_SPARC_TLS_LE_HIX22           0xcc          0  .rela.text     .tbss
(section)
-  R_SPARC_TLS_LE_LOX10           0xd0          0  .rela.text     .tbss
(section)
-  R_SPARC_TLS_LE_HIX22           0xdc          0  .rela.text     .tbss
(section)
-  R_SPARC_TLS_LE_LOX10           0xe0          0  .rela.text     .tbss
(section)
+  R_SPARC_TLS_LE_HIX22           0xcc          0  .rela.text     _ZL3thr
+  R_SPARC_TLS_LE_LOX10           0xd0          0  .rela.text     _ZL3thr
+  R_SPARC_TLS_LE_HIX22           0xdc          0  .rela.text     _ZL3thr
+  R_SPARC_TLS_LE_LOX10           0xe0          0  .rela.text     _ZL3thr
   R_SPARC_HI22                   0xf0      0x1a0  .rela.text     .text
(section)
   R_SPARC_LO10                   0xf4      0x1a0  .rela.text     .text
(section)
   R_SPARC_WDISP30               0x100          0  .rela.text    
GOMP_parallel_start
@@ -47,8 +47,8 @@
   R_SPARC_WDISP30               0x1e0          0  .rela.text    
omp_get_num_threads
   R_SPARC_HI22                  0x1ec          0  .rela.text     _ZL8nthreads
   R_SPARC_LO10                  0x1f0          0  .rela.text     _ZL8nthreads
-  R_SPARC_TLS_LE_HIX22          0x208          0  .rela.text     .tbss
(section)
-  R_SPARC_TLS_LE_LOX10          0x20c          0  .rela.text     .tbss
(section)
+  R_SPARC_TLS_LE_HIX22          0x208          0  .rela.text     _ZL3thr
+  R_SPARC_TLS_LE_LOX10          0x20c          0  .rela.text     _ZL3thr
   R_SPARC_WDISP30               0x21c          0  .rela.text     _ZN1BaSERKS_

 Relocation Section:  .rela.eh_frame

In the broken object, the relocations are relative to the .tbss section, in the
working one, they are relative to a symbol.

I strongly suppose this is due to the fix for 

6728528  assembler does not handle __thread code correctly

although

  http://bugs.sun.com/view_bug.do?bug_id=6728528

doesn't provide much detail.


-- 

ro at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu dot org


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

Reply via email to