Remove unneeded AUX register symbols.
[deliverable/binutils-gdb.git] / gas / config / tc-arc.c
index 1b70e03b3b2c8a25b6bdddefc25758d5d4c24949..98cac6a3f423cd961b6c3e3dac2b38028fa544d5 100644 (file)
@@ -1611,6 +1611,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry,
                             from BKTOK.  */
                          tok[tokidx].X_op = O_constant;
                          tok[tokidx].X_add_number = auxr->address;
+                         ARC_SET_FLAG (tok[i].X_add_symbol, ARC_FLAG_AUX);
                          break;
                        }
 
@@ -3857,3 +3858,22 @@ tc_arc_regname_to_dw2regnum (char *regname)
 
   return -1;
 }
+
+/* Adjust the symbol table.  Delete found AUX register symbols.  */
+
+void
+arc_adjust_symtab (void)
+{
+  symbolS * sym;
+
+  for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
+    {
+      /* I've created a symbol during parsing process.  Now, remove
+        the symbol as it is found to be an AUX register.  */
+      if (ARC_GET_FLAG (sym) & ARC_FLAG_AUX)
+       symbol_remove (sym, &symbol_rootP, &symbol_lastP);
+    }
+
+  /* Now do generic ELF adjustments.  */
+  elf_adjust_symtab ();
+}
This page took 0.024506 seconds and 4 git commands to generate.