(TC_FORCE_RELOCATION (FIX))
#endif
-#ifndef TC_FORCE_RELOCATION_LOCAL
-#define TC_FORCE_RELOCATION_LOCAL(FIX) \
+#define GENERIC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
|| TC_FORCE_RELOCATION (FIX))
+#ifndef TC_FORCE_RELOCATION_LOCAL
+#define TC_FORCE_RELOCATION_LOCAL GENERIC_FORCE_RELOCATION_LOCAL
#endif
+#define GENERIC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \
+ (!SEG_NORMAL (SEG))
#ifndef TC_FORCE_RELOCATION_SUB_SAME
-#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \
- (! SEG_NORMAL (SEG))
+#define TC_FORCE_RELOCATION_SUB_SAME GENERIC_FORCE_RELOCATION_SUB_SAME
#endif
#ifndef md_register_arithmetic
valueT value = S_GET_VALUE (fragP->fr_symbol);
int size;
+ if (!S_IS_DEFINED (fragP->fr_symbol))
+ {
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("leb128 operand is an undefined symbol: %s"),
+ S_GET_NAME (fragP->fr_symbol));
+ }
+
size = output_leb128 (fragP->fr_literal + fragP->fr_fix, value,
fragP->fr_subtype);
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
else
sprintf (buf2, "%ld", (long) add_number);
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("value of %s too large for field of %d bytes at %s"),
+ ngettext ("value of %s too large for field "
+ "of %d byte at %s",
+ "value of %s too large for field "
+ "of %d bytes at %s",
+ fixP->fx_size),
buf2, fixP->fx_size, buf);
} /* Generic error checking. */
}
if (obstack_room (ob) < header_size)
first_newf = frag_alloc (ob);
if (obstack_room (ob) < header_size)
- as_fatal (_("can't extend frag %u chars"), header_size);
+ as_fatal (ngettext ("can't extend frag %lu char",
+ "can't extend frag %lu chars",
+ (unsigned long) header_size),
+ (unsigned long) header_size);
last_newf = first_newf;
obstack_blank_fast (ob, header_size);
last_newf->fr_type = rs_fill;
f->fr_literal, (file_ptr) offset,
(bfd_size_type) f->fr_fix);
if (!x)
- as_fatal (_("can't write %ld bytes to section %s of %s because: '%s'"),
- (long) f->fr_fix, sec->name,
- stdoutput->filename,
+ as_fatal (ngettext ("can't write %ld byte "
+ "to section %s of %s: '%s'",
+ "can't write %ld bytes "
+ "to section %s of %s: '%s'",
+ (long) f->fr_fix),
+ (long) f->fr_fix,
+ sec->name, stdoutput->filename,
bfd_errmsg (bfd_get_error ()));
offset += f->fr_fix;
}
(file_ptr) offset,
(bfd_size_type) fill_size);
if (!x)
- as_fatal (_("can't fill %ld bytes in section %s of %s because '%s'"),
- (long) fill_size, sec->name,
- stdoutput->filename,
+ as_fatal (ngettext ("can't fill %ld byte "
+ "in section %s of %s: '%s'",
+ "can't fill %ld bytes "
+ "in section %s of %s: '%s'",
+ (long) fill_size),
+ (long) fill_size,
+ sec->name, stdoutput->filename,
bfd_errmsg (bfd_get_error ()));
offset += fill_size;
}
(stdoutput, sec, buf, (file_ptr) offset,
(bfd_size_type) n_per_buf * fill_size);
if (!x)
- as_fatal (_("cannot fill %ld bytes in section %s of %s because: '%s'"),
- (long)(n_per_buf * fill_size), sec->name,
- stdoutput->filename,
+ as_fatal (ngettext ("can't fill %ld byte "
+ "in section %s of %s: '%s'",
+ "can't fill %ld bytes "
+ "in section %s of %s: '%s'",
+ (long) (n_per_buf * fill_size)),
+ (long) (n_per_buf * fill_size),
+ sec->name, stdoutput->filename,
bfd_errmsg (bfd_get_error ()));
offset += n_per_buf * fill_size;
}
/* Relaxation has completed. Freeze all syms. */
finalize_syms = 1;
+ dwarf2dbg_final_check ();
+
#ifdef md_post_relax_hook
md_post_relax_hook;
#endif
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)
if (offset % fragP->fr_var != 0)
{
as_bad_where (fragP->fr_file, fragP->fr_line,
- _("alignment padding (%lu bytes) not a multiple of %ld"),
+ ngettext ("alignment padding (%lu byte) "
+ "not a multiple of %ld",
+ "alignment padding (%lu bytes) "
+ "not a multiple of %ld",
+ (unsigned long) offset),
(unsigned long) offset, (long) fragP->fr_var);
offset -= (offset % fragP->fr_var);
}