Move struc-symbol.h to symbols.c
[deliverable/binutils-gdb.git] / gas / config / tc-tilegx.c
index 8ee95e7fbf3c2e1c49b7b66bee6e4eecbb0244ba..49e05b144413e57a0ac4298c40f9c97efe3ae589 100644 (file)
@@ -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);
This page took 0.024887 seconds and 4 git commands to generate.