+2003-05-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * ldmain.h (overflow_cutoff_limit): Declare.
+ * ldmain.c (overflow_cutoff_limit): Define, initialized to 10.
+ (reloc_overflow): Limit error messages based on it.
+ * lexsup.c (parse_args) <OPTION_VERBOSE>: Set cutoff to
+ unlimited.
+
2003-05-05 Alan Modra <amodra@bigpond.net.au>
* ldlex.l: Accept C style comments in version scripts.
return TRUE;
}
+/* Counter to limit the number of relocation overflow error messages
+ to print. Errors are printed as it is decremented. When it's
+ called and the counter is zero, a final message is printed
+ indicating more relocations were omitted. When it gets to -1, no
+ such errors are printed. If it's initially set to a value less
+ than -1, all such errors will be printed (--verbose does this). */
+
+int overflow_cutoff_limit = 10;
+
/* This is called when a reloc overflows. */
static bfd_boolean
asection *section;
bfd_vma address;
{
+ if (overflow_cutoff_limit == -1)
+ return TRUE;
+
if (abfd == (bfd *) NULL)
einfo (_("%P%X: generated"));
else
einfo ("%X%C:", abfd, section, address);
+
+ if (overflow_cutoff_limit >= 0
+ && overflow_cutoff_limit-- == 0)
+ {
+ einfo (_(" additional relocation overflows omitted from the output\n"));
+ return TRUE;
+ }
+
einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
extern int g_switch_value;
extern const char *output_filename;
extern struct bfd_link_info link_info;
+extern int overflow_cutoff_limit;
extern void add_ysym PARAMS ((const char *));
extern void add_wrap PARAMS ((const char *));