aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sparc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2004-10-02 00:18:31 +0000
committerH.J. Lu <hjl.tools@gmail.com>2004-10-02 00:18:31 +0000
commit7c1d09598d407e1f37cdbcc843c56359bc9b1a28 (patch)
tree5757146aac5306e769f4897cd9a7b905cee1f161 /gas/config/tc-sparc.c
parent007807770d1da6999b3b5408d60b928a05512a0d (diff)
downloadgdb-7c1d09598d407e1f37cdbcc843c56359bc9b1a28.zip
gdb-7c1d09598d407e1f37cdbcc843c56359bc9b1a28.tar.gz
gdb-7c1d09598d407e1f37cdbcc843c56359bc9b1a28.tar.bz2
2004-10-01 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-ppc.c (md_apply_fix3): Call S_SET_THREAD_LOCAL for TLS relocations. * config/tc-s390.c (md_apply_fix3): Likewise. * config/tc-sparc.c (md_apply_fix3): Likewise.
Diffstat (limited to 'gas/config/tc-sparc.c')
-rw-r--r--gas/config/tc-sparc.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index ba6b4ed..da10db2 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3012,7 +3012,41 @@ md_apply_fix3 (fixP, valP, segment)
#ifdef OBJ_ELF
/* SPARC ELF relocations don't use an addend in the data field. */
if (fixP->fx_addsy != NULL)
- return;
+ {
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_SPARC_TLS_GD_HI22:
+ case BFD_RELOC_SPARC_TLS_GD_LO10:
+ case BFD_RELOC_SPARC_TLS_GD_ADD:
+ case BFD_RELOC_SPARC_TLS_GD_CALL:
+ case BFD_RELOC_SPARC_TLS_LDM_HI22:
+ case BFD_RELOC_SPARC_TLS_LDM_LO10:
+ case BFD_RELOC_SPARC_TLS_LDM_ADD:
+ case BFD_RELOC_SPARC_TLS_LDM_CALL:
+ case BFD_RELOC_SPARC_TLS_LDO_HIX22:
+ case BFD_RELOC_SPARC_TLS_LDO_LOX10:
+ case BFD_RELOC_SPARC_TLS_LDO_ADD:
+ case BFD_RELOC_SPARC_TLS_IE_HI22:
+ case BFD_RELOC_SPARC_TLS_IE_LO10:
+ case BFD_RELOC_SPARC_TLS_IE_LD:
+ case BFD_RELOC_SPARC_TLS_IE_LDX:
+ case BFD_RELOC_SPARC_TLS_IE_ADD:
+ case BFD_RELOC_SPARC_TLS_LE_HIX22:
+ case BFD_RELOC_SPARC_TLS_LE_LOX10:
+ case BFD_RELOC_SPARC_TLS_DTPMOD32:
+ case BFD_RELOC_SPARC_TLS_DTPMOD64:
+ case BFD_RELOC_SPARC_TLS_DTPOFF32:
+ case BFD_RELOC_SPARC_TLS_DTPOFF64:
+ case BFD_RELOC_SPARC_TLS_TPOFF32:
+ case BFD_RELOC_SPARC_TLS_TPOFF64:
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+
+ default:
+ break;
+ }
+
+ return;
+ }
#endif
/* This is a hack. There should be a better way to