if (overflow_cutoff_limit == -1)
return TRUE;
- einfo ("%X%C:", abfd, section, address);
+ einfo ("%X%H:", abfd, section, address);
if (overflow_cutoff_limit >= 0
&& overflow_cutoff_limit-- == 0)
asection *section,
bfd_vma address)
{
- einfo (_("%X%C: dangerous relocation: %s\n"),
+ einfo (_("%X%H: dangerous relocation: %s\n"),
abfd, section, address, message);
return TRUE;
}
asection *section,
bfd_vma address)
{
- einfo (_("%X%C: reloc refers to symbol `%T' which is not being output\n"),
+ einfo (_("%X%H: reloc refers to symbol `%T' which is not being output\n"),
abfd, section, address, name);
return TRUE;
}
%E current bfd error or errno
%F error is fatal
%G like %D, but only function name
+ %H like %C but in addition emit section+offset
%I filename from a lang_input_statement_type
%P print program name
%R info about a relent
case 'C':
case 'D':
case 'G':
+ case 'H':
/* Clever filename:linenumber with function name if possible.
The arguments are a BFD, a section, and an offset. */
{
const char *functionname;
unsigned int linenumber;
bfd_boolean discard_last;
+ bfd_boolean done;
abfd = va_arg (arg, bfd *);
section = va_arg (arg, asection *);
We do not always have a line number available so if
we cannot find them we print out the section name and
- offset instread. */
+ offset instead. */
discard_last = TRUE;
if (abfd != NULL
&& bfd_find_nearest_line (abfd, section, asymbols, offset,
&filename, &functionname,
&linenumber))
{
- if (functionname != NULL && fmt[-1] == 'C')
+ if (functionname != NULL
+ && (fmt[-1] == 'C' || fmt[-1] == 'H'))
{
/* Detect the case where we are printing out a
message for the same function as the last
if (filename != NULL)
fprintf (fp, "%s:", filename);
+ done = fmt[-1] != 'H';
if (functionname != NULL && fmt[-1] == 'G')
lfinfo (fp, "%T", functionname);
else if (filename != NULL && linenumber != 0)
- fprintf (fp, "%u", linenumber);
+ fprintf (fp, "%u%s", linenumber, ":" + done);
else
- lfinfo (fp, "(%A+0x%v)", section, offset);
+ done = FALSE;
}
else
- lfinfo (fp, "%B:(%A+0x%v)", abfd, section, offset);
+ {
+ lfinfo (fp, "%B:", abfd);
+ done = FALSE;
+ }
+ if (!done)
+ lfinfo (fp, "(%A+0x%v)", section, offset);
if (discard_last)
{