mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
* ldmisc.c (vfinfo): Handle %D as %C, but never print the function
name. For %C, print the function name on a separate line, to keep the length of error messages under control. * ldmain.c (multiple_definition): Use %D for ``first defined here.'' (undefined_symbol): Use %D for ``more undefined references follow''. PR 3770.
This commit is contained in:
@ -1,5 +1,13 @@
|
|||||||
Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||||
|
|
||||||
|
* ldmisc.c (vfinfo): Handle %D as %C, but never print the function
|
||||||
|
name. For %C, print the function name on a separate line, to keep
|
||||||
|
the length of error messages under control.
|
||||||
|
* ldmain.c (multiple_definition): Use %D for ``first defined
|
||||||
|
here.''
|
||||||
|
(undefined_symbol): Use %D for ``more undefined references
|
||||||
|
follow''.
|
||||||
|
|
||||||
* ldmisc.c (multiple_warn): Remove; no longer used.
|
* ldmisc.c (multiple_warn): Remove; no longer used.
|
||||||
* ldmisc.h (multiple_warn): Don't declare.
|
* ldmisc.h (multiple_warn): Don't declare.
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@ main (argc, argv)
|
|||||||
config.dynamic_link = false;
|
config.dynamic_link = false;
|
||||||
command_line.force_common_definition = false;
|
command_line.force_common_definition = false;
|
||||||
command_line.interpreter = NULL;
|
command_line.interpreter = NULL;
|
||||||
|
command_line.rpath = NULL;
|
||||||
|
|
||||||
link_info.callbacks = &link_callbacks;
|
link_info.callbacks = &link_callbacks;
|
||||||
link_info.relocateable = false;
|
link_info.relocateable = false;
|
||||||
@ -604,7 +605,7 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
|
|||||||
einfo ("%X%C: multiple definition of `%T'\n",
|
einfo ("%X%C: multiple definition of `%T'\n",
|
||||||
nbfd, nsec, nval, name);
|
nbfd, nsec, nval, name);
|
||||||
if (obfd != (bfd *) NULL)
|
if (obfd != (bfd *) NULL)
|
||||||
einfo ("%C: first defined here\n", obfd, osec, oval);
|
einfo ("%D: first defined here\n", obfd, osec, oval);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -798,7 +799,7 @@ undefined_symbol (info, name, abfd, section, address)
|
|||||||
einfo ("%X%C: undefined reference to `%T'\n",
|
einfo ("%X%C: undefined reference to `%T'\n",
|
||||||
abfd, section, address, name);
|
abfd, section, address, name);
|
||||||
else if (error_count == MAX_ERRORS_IN_A_ROW)
|
else if (error_count == MAX_ERRORS_IN_A_ROW)
|
||||||
einfo ("%C: more undefined references to `%T' follow\n",
|
einfo ("%D: more undefined references to `%T' follow\n",
|
||||||
abfd, section, address, name);
|
abfd, section, address, name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -880,7 +881,7 @@ notice_ysym (info, name, abfd, section, value)
|
|||||||
bfd_vma value;
|
bfd_vma value;
|
||||||
{
|
{
|
||||||
einfo ("%B: %s %s\n", abfd,
|
einfo ("%B: %s %s\n", abfd,
|
||||||
section != &bfd_und_section ? "definition of" : "reference to",
|
bfd_is_und_section (section) ? "reference to" : "definition of",
|
||||||
name);
|
name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
13
ld/ldmisc.c
13
ld/ldmisc.c
@ -50,7 +50,8 @@ static const char *demangle PARAMS ((const char *string,
|
|||||||
%X no object output, fail return
|
%X no object output, fail return
|
||||||
%V hex bfd_vma
|
%V hex bfd_vma
|
||||||
%v hex bfd_vma, no leading zeros
|
%v hex bfd_vma, no leading zeros
|
||||||
%C Clever filename:linenumber
|
%C clever filename:linenumber with function
|
||||||
|
%D like %C, but no function name
|
||||||
%R info about a relent
|
%R info about a relent
|
||||||
%s arbitrary string, like printf
|
%s arbitrary string, like printf
|
||||||
%d integer, like printf
|
%d integer, like printf
|
||||||
@ -208,6 +209,7 @@ vfinfo(fp, fmt, arg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
|
case 'D':
|
||||||
/* Clever filename:linenumber with function name if possible,
|
/* Clever filename:linenumber with function name if possible,
|
||||||
or section name as a last resort. The arguments are a BFD,
|
or section name as a last resort. The arguments are a BFD,
|
||||||
a section, and an offset. */
|
a section, and an offset. */
|
||||||
@ -254,9 +256,12 @@ vfinfo(fp, fmt, arg)
|
|||||||
if (filename == (char *) NULL)
|
if (filename == (char *) NULL)
|
||||||
filename = abfd->filename;
|
filename = abfd->filename;
|
||||||
|
|
||||||
if (functionname != (char *)NULL)
|
if (functionname != NULL && fmt[-1] == 'C')
|
||||||
fprintf (fp, "%s:%u: %s", filename, linenumber,
|
{
|
||||||
demangle (functionname, 1));
|
fprintf (fp, "%s: In function `%s':\n", filename,
|
||||||
|
demangle (functionname, 1));
|
||||||
|
fprintf (fp, "%s:%u", filename, linenumber);
|
||||||
|
}
|
||||||
else if (linenumber != 0)
|
else if (linenumber != 0)
|
||||||
fprintf (fp, "%s:%u", filename, linenumber);
|
fprintf (fp, "%s:%u", filename, linenumber);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user