aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-tilegx.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-tilegx.c')
-rw-r--r--gas/config/tc-tilegx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c
index 8ee95e7..49e05b1 100644
--- a/gas/config/tc-tilegx.c
+++ b/gas/config/tc-tilegx.c
@@ -19,7 +19,6 @@
MA 02110-1301, USA. */
#include "as.h"
-#include "struc-symbol.h"
#include "subsegs.h"
#include "elf/tilegx.h"
@@ -737,16 +736,18 @@ emit_tilegx_instruction (tilegx_bundle_bits bits,
}
else if (use_subexp)
{
+ expressionS *sval = NULL;
/* Now that we've changed the reloc, change ha16(x) into x,
etc. */
- if (!operand_exp->X_add_symbol->sy_flags.sy_local_symbol
- && operand_exp->X_add_symbol->sy_value.X_md)
+ if (symbol_symbolS (operand_exp->X_add_symbol))
+ sval = symbol_get_value_expression (operand_exp->X_add_symbol);
+ if (sval && sval->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
value here. */
- operand_exp = &operand_exp->X_add_symbol->sy_value;
+ operand_exp = sval;
if (require_symbol)
{
@@ -1067,7 +1068,7 @@ tilegx_parse_name (char *name, expressionS *e, char *nextcharP)
/* HACK: mark this symbol as a temporary wrapper around a proper
expression, so we can unwrap it later once we have communicated
the relocation type. */
- sym->sy_value.X_md = 1;
+ symbol_get_value_expression (sym)->X_md = 1;
}
memset (e, 0, sizeof *e);