aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-bout.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/obj-bout.c')
-rw-r--r--gas/config/obj-bout.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gas/config/obj-bout.c b/gas/config/obj-bout.c
index ba7cadc..0136c17 100644
--- a/gas/config/obj-bout.c
+++ b/gas/config/obj-bout.c
@@ -96,6 +96,14 @@ obj_emit_relocations (where, fixP, segment_address_in_file)
if (fixP->fx_done == 0
|| fixP->fx_r_type != NO_RELOC)
{
+ symbolS *sym;
+
+ sym = fixP->fx_addsy;
+ while (sym->sy_value.X_op == O_symbol
+ && (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
+ sym = sym->sy_value.X_add_symbol;
+ fixP->fx_addsy = sym;
+
tc_bout_fix_to_chars (*where, fixP, segment_address_in_file);
*where += sizeof (struct relocation_info);
} /* if there's a symbol */
@@ -246,6 +254,15 @@ obj_crawl_symbol_chain (headers)
resolve_symbol_value (symbolP);
+ /* Skip symbols which were equated to undefined or common
+ symbols. */
+ if (symbolP->sy_value.X_op == O_symbol
+ && (! S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP)))
+ {
+ *symbolPP = symbol_next (symbolP);
+ continue;
+ }
+
/* OK, here is how we decide which symbols go out into the
brave new symtab. Symbols that do are: