* ldmisc.c (vfinfo): Reindent.
This commit is contained in:
parent
e25a798839
commit
f0f80b13f8
@ -1,3 +1,7 @@
|
|||||||
|
Fri Apr 26 14:42:27 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* ldmisc.c (vfinfo): Reindent.
|
||||||
|
|
||||||
Mon Apr 22 12:07:32 1996 Ian Lance Taylor <ian@cygnus.com>
|
Mon Apr 22 12:07:32 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* ldlang.c (lang_size_sections): If _cooked_size is not 0, then
|
* ldlang.c (lang_size_sections): If _cooked_size is not 0, then
|
||||||
|
29
ld/ldmisc.c
29
ld/ldmisc.c
@ -1,6 +1,5 @@
|
|||||||
/* ldmisc.c
|
/* ldmisc.c
|
||||||
Copyright (C) 1991, 92, 93, 94 Free Software Foundation, Inc.
|
Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Written by Steve Chamberlain of Cygnus Support.
|
Written by Steve Chamberlain of Cygnus Support.
|
||||||
|
|
||||||
This file is part of GLD, the Gnu Linker.
|
This file is part of GLD, the Gnu Linker.
|
||||||
@ -102,7 +101,7 @@ vfinfo (fp, fmt, arg)
|
|||||||
{
|
{
|
||||||
boolean fatal = false;
|
boolean fatal = false;
|
||||||
|
|
||||||
while (*fmt)
|
while (*fmt != '\0')
|
||||||
{
|
{
|
||||||
while (*fmt != '%' && *fmt != '\0')
|
while (*fmt != '%' && *fmt != '\0')
|
||||||
{
|
{
|
||||||
@ -168,14 +167,12 @@ vfinfo (fp, fmt, arg)
|
|||||||
/* filename from a bfd */
|
/* filename from a bfd */
|
||||||
{
|
{
|
||||||
bfd *abfd = va_arg (arg, bfd *);
|
bfd *abfd = va_arg (arg, bfd *);
|
||||||
if (abfd->my_archive) {
|
if (abfd->my_archive)
|
||||||
fprintf (fp, "%s(%s)", abfd->my_archive->filename,
|
fprintf (fp, "%s(%s)", abfd->my_archive->filename,
|
||||||
abfd->filename);
|
abfd->filename);
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
fprintf (fp, "%s", abfd->filename);
|
fprintf (fp, "%s", abfd->filename);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'F':
|
case 'F':
|
||||||
@ -196,12 +193,16 @@ vfinfo (fp, fmt, arg)
|
|||||||
case 'I':
|
case 'I':
|
||||||
/* filename from a lang_input_statement_type */
|
/* filename from a lang_input_statement_type */
|
||||||
{
|
{
|
||||||
lang_input_statement_type *i =
|
lang_input_statement_type *i;
|
||||||
va_arg(arg,lang_input_statement_type *);
|
|
||||||
|
|
||||||
if (i->the_bfd->my_archive)
|
i = va_arg (arg, lang_input_statement_type *);
|
||||||
fprintf(fp, "(%s)", i->the_bfd->my_archive->filename);
|
if (bfd_my_archive (i->the_bfd) != NULL)
|
||||||
|
fprintf (fp, "(%s)",
|
||||||
|
bfd_get_filename (bfd_my_archive (i->the_bfd)));
|
||||||
fprintf (fp, "%s", i->local_sym_name);
|
fprintf (fp, "%s", i->local_sym_name);
|
||||||
|
if (bfd_my_archive (i->the_bfd) == NULL
|
||||||
|
&& strcmp (i->local_sym_name, i->filename) != 0)
|
||||||
|
fprintf (fp, " (%s)", i->filename);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -275,7 +276,8 @@ vfinfo (fp, fmt, arg)
|
|||||||
|
|
||||||
discard_last = true;
|
discard_last = true;
|
||||||
if (bfd_find_nearest_line (abfd, section, asymbols, offset,
|
if (bfd_find_nearest_line (abfd, section, asymbols, offset,
|
||||||
&filename, &functionname, &linenumber))
|
&filename, &functionname,
|
||||||
|
&linenumber))
|
||||||
{
|
{
|
||||||
if (functionname != NULL && fmt[-1] == 'C')
|
if (functionname != NULL && fmt[-1] == 'C')
|
||||||
{
|
{
|
||||||
@ -307,7 +309,8 @@ vfinfo (fp, fmt, arg)
|
|||||||
if (linenumber != 0)
|
if (linenumber != 0)
|
||||||
fprintf (fp, "%s:%u", filename, linenumber);
|
fprintf (fp, "%s:%u", filename, linenumber);
|
||||||
else
|
else
|
||||||
finfo (fp, "%s(%s+0x%v)", filename, section->name, offset);
|
finfo (fp, "%s(%s+0x%v)", filename, section->name,
|
||||||
|
offset);
|
||||||
}
|
}
|
||||||
else if (filename == NULL
|
else if (filename == NULL
|
||||||
|| strcmp (filename, abfd->filename) == 0)
|
|| strcmp (filename, abfd->filename) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user