aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gas/write.c b/gas/write.c
index 8efdbc5..df88905 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -724,7 +724,7 @@ resolve_reloc_expr_symbols (void)
as_bad_where (r->file, r->line, _("invalid reloc expression"));
sec = NULL;
}
- else if (sym != NULL)
+ else if (sym != NULL && sec != NULL)
{
/* Convert relocs against local symbols to refer to the
corresponding section symbol plus offset instead. Keep
@@ -2107,12 +2107,11 @@ write_object_file (void)
if (S_IS_COMMON (symp)
&& !TC_FAKE_LABEL (sname)
- && !S_IS_WEAKREFR (symp)
- && (!S_IS_EXTERNAL (symp) || S_IS_LOCAL (symp)))
+ && !S_IS_WEAKREFR (symp))
{
expressionS *e = symbol_get_value_expression (symp);
- as_bad (_("Local symbol `%s' can't be equated to common symbol `%s'"),
+ as_bad (_("`%s' can't be equated to common symbol `%s'"),
sname, S_GET_NAME (e->X_add_symbol));
}
if (S_GET_SEGMENT (symp) == reg_section)