summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorwalt <walt>2012-02-25 22:40:48 +0000
committerwalt <walt>2012-02-25 22:40:48 +0000
commit9c98a51527f335fbeedad6b3b33554b773c8b318 (patch)
tree7d9981abfb53637c7f706e0141f339333f31e943 /gas
parent29c470fbb6ec3332f65abfccd1afa44bcfa42df4 (diff)
downloadbinutils-redhat-9c98a51527f335fbeedad6b3b33554b773c8b318.tar.gz
Fix regression from change
http://sourceware.org/ml/binutils-cvs/2012-01/msg00049.html . The code needs to check that the symbol is not a local symbol before accessing a non-local-symbol field. * tc-tilepro.c (emit_tilepro_instruction): Check if symbol is non-local before checking sy_value. * tc-tilegx.c (emit_tilegx_instruction): Ditto.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-tilegx.c3
-rw-r--r--gas/config/tc-tilepro.c3
3 files changed, 10 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5e5f50b36e..6e6f70a5ba 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2012-02-25 Walter Lee <walt@tilera.com>
+ * tc-tilepro.c (emit_tilepro_instruction): Check if symbol is
+ non-local before checking sy_value.
+ * tc-tilegx.c (emit_tilegx_instruction): Ditto.
+
+2012-02-25 Walter Lee <walt@tilera.com>
+
* tc-tilepro.c (O_tls_le): Define operator.
(O_tls_le_lo16): Ditto.
(O_tls_le_hi16): Ditto.
diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c
index eda36c0d18..b2d94205be 100644
--- a/gas/config/tc-tilegx.c
+++ b/gas/config/tc-tilegx.c
@@ -715,7 +715,8 @@ emit_tilegx_instruction (tilegx_bundle_bits bits,
/* Now that we've changed the reloc, change ha16(x) into x,
etc. */
- if (operand_exp->X_add_symbol->sy_value.X_md)
+ if (!operand_exp->X_add_symbol->sy_flags.sy_local_symbol
+ && operand_exp->X_add_symbol->sy_value.X_md)
{
/* HACK: We used X_md to mark this symbol as a fake wrapper
around a real expression. To unwrap it, we just grab its
diff --git a/gas/config/tc-tilepro.c b/gas/config/tc-tilepro.c
index 0b378c2f19..733a628f20 100644
--- a/gas/config/tc-tilepro.c
+++ b/gas/config/tc-tilepro.c
@@ -631,7 +631,8 @@ emit_tilepro_instruction (tilepro_bundle_bits bits,
/* Now that we've changed the reloc, change ha16(x) into x,
etc. */
- if (operand_exp->X_add_symbol->sy_value.X_md)
+ if (!operand_exp->X_add_symbol->sy_flags.sy_local_symbol
+ && operand_exp->X_add_symbol->sy_value.X_md)
{
/* HACK: We used X_md to mark this symbol as a fake wrapper
around a real expression. To unwrap it, we just grab its