From: H.J. Lu Date: Sat, 2 Oct 2004 00:18:31 +0000 (+0000) Subject: 2004-10-01 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c1d09598d407e1f37cdbcc843c56359bc9b1a28;p=binutils-gdb.git 2004-10-01 H.J. Lu * 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 3f8fff4a1b3..78febb83bd3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2004-10-01 H.J. Lu + + * 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 * 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 eb119ea6823..410c0f22788 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 02427283d9e..83b671d7bed 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 ba6b4ed5689..da10db2f575 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