diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2004-10-02 00:18:31 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2004-10-02 00:18:31 +0000 |
commit | 7c1d09598d407e1f37cdbcc843c56359bc9b1a28 (patch) | |
tree | 5757146aac5306e769f4897cd9a7b905cee1f161 | |
parent | 007807770d1da6999b3b5408d60b928a05512a0d (diff) | |
download | gdb-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.
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 3 | ||||
-rw-r--r-- | gas/config/tc-s390.c | 2 | ||||
-rw-r--r-- | gas/config/tc-sparc.c | 36 |
4 files changed, 47 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3f8fff4..78febb8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +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. + 2004-10-01 Paul Brook <paul@codesourcery.com> * config/tc-arm.c (arm_elf_section_type): New function. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index eb119ea..410c0f2 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -5846,6 +5846,8 @@ md_apply_fix3 (fixP, valP, seg) break; case BFD_RELOC_PPC_TLS: + break; + case BFD_RELOC_PPC_DTPMOD: case BFD_RELOC_PPC_TPREL16: case BFD_RELOC_PPC_TPREL16_LO: @@ -5885,6 +5887,7 @@ md_apply_fix3 (fixP, valP, seg) case BFD_RELOC_PPC64_DTPREL16_HIGHERA: case BFD_RELOC_PPC64_DTPREL16_HIGHEST: case BFD_RELOC_PPC64_DTPREL16_HIGHESTA: + S_SET_THREAD_LOCAL (fixP->fx_addsy); break; #endif /* Because SDA21 modifies the register field, the size is set to 4 diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 0242728..83b671d 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -2217,10 +2217,12 @@ md_apply_fix3 (fixP, valP, seg) case BFD_RELOC_390_TLS_DTPMOD: case BFD_RELOC_390_TLS_DTPOFF: case BFD_RELOC_390_TLS_TPOFF: + S_SET_THREAD_LOCAL (fixP->fx_addsy); /* Fully resolved at link time. */ break; case BFD_RELOC_390_TLS_IEENT: /* Fully resolved at link time. */ + S_SET_THREAD_LOCAL (fixP->fx_addsy); value += 2; break; 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 |