This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH][ARC] TLS: Various fixes.
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: <binutils at sourceware dot org>
- Cc: <Claudiu dot Zissulescu at synopsys dot com>, <Francois dot Bedard at synopsys dot com>
- Date: Mon, 25 Jan 2016 16:32:31 +0100
- Subject: [PATCH][ARC] TLS: Various fixes.
- Authentication-results: sourceware.org; auth=none
This patch solves some assembler issues for TLS.
If the patch is ok, please submit it as I do not have write access to the repo.
Thank you,
Claudiu
gas/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* config/tc-arc.c (md_apply_fix): Allow addendum.
(arc_reloc_op): Allow complex expressions for tpoff.
(md_apply_fix): Handle resolved TLS local symbol.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
---
gas/config/tc-arc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 40ba0ad..20a48f7 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -363,7 +363,7 @@ static const struct arc_reloc_op_tag
DEF (tlsgd, BFD_RELOC_ARC_TLS_GD_GOT, 0),
DEF (tlsie, BFD_RELOC_ARC_TLS_IE_GOT, 0),
DEF (tpoff9, BFD_RELOC_ARC_TLS_LE_S9, 0),
- DEF (tpoff, BFD_RELOC_ARC_TLS_LE_32, 0),
+ DEF (tpoff, BFD_RELOC_ARC_TLS_LE_32, 1),
DEF (dtpoff9, BFD_RELOC_ARC_TLS_DTPOFF_S9, 0),
DEF (dtpoff, BFD_RELOC_ARC_TLS_DTPOFF, 0),
};
@@ -1301,7 +1301,8 @@ md_apply_fix (fixS *fixP,
{
case BFD_RELOC_ARC_TLS_DTPOFF:
case BFD_RELOC_ARC_TLS_LE_32:
- fixP->fx_offset = 0;
+ if (fixP->fx_done)
+ break;
/* Fall through. */
case BFD_RELOC_ARC_TLS_GD_GOT:
case BFD_RELOC_ARC_TLS_IE_GOT:
@@ -1363,6 +1364,12 @@ md_apply_fix (fixS *fixP,
from ld rx,[pcl,@sym@gotpc] to add rx,pcl,@sym@gotpc. */
as_bad (_("Unsupported operation on reloc"));
return;
+
+ case BFD_RELOC_ARC_TLS_DTPOFF:
+ case BFD_RELOC_ARC_TLS_LE_32:
+ gas_assert (!fixP->fx_addsy);
+ gas_assert (!fixP->fx_subsy);
+
case BFD_RELOC_ARC_GOTOFF:
case BFD_RELOC_ARC_32_ME:
case BFD_RELOC_ARC_PC32:
--
1.9.1