* ldmisc.c (vfinfo): Revert 2005-10-05 changes. If
authorJakub Jelinek <jakub@redhat.com>
Fri, 31 Mar 2006 11:23:55 +0000 (11:23 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 31 Mar 2006 11:23:55 +0000 (11:23 +0000)
bfd_find_nearest_line succeeded for %C or %D, but filename
is NULL, print section+offset at the end.

ld/ChangeLog
ld/ldmisc.c

index 57894bd058bbb601a086955bc64cd184f51602fb..1eba0438336ba6822bf87c761eadc7cbaaab6bab 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * ldmisc.c (vfinfo): Revert 2005-10-05 changes.  If
+       bfd_find_nearest_line succeeded for %C or %D, but filename
+       is NULL, print section+offset at the end.
+
 2006-03-25  Bernd Schmidt  <bernd.schmidt@analog.com>
 
        * emulparams/elf32bfinfd.sh: New file.
index 3ba4221e6ee2b9dcfd60ba298c7cbe67ce3d21d8..8af043aa2b24bc70be099ca8ffe0d98386e9f6c8 100644 (file)
@@ -1,6 +1,6 @@
 /* ldmisc.c
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005
+   2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
@@ -337,7 +337,7 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
                                && strcmp (last_file, filename) != 0)
                            || strcmp (last_function, functionname) != 0)
                          {
-                           lfinfo (fp, _("%B: In function `%T'"),
+                           lfinfo (fp, _("%B: In function `%T':\n"),
                                    abfd, functionname);
 
                            last_bfd = abfd;
@@ -353,20 +353,17 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
                        discard_last = FALSE;
                      }
                    else
-                     lfinfo (fp, "%B", abfd);
+                     lfinfo (fp, "%B:", abfd);
 
                    if (filename != NULL)
-                     fprintf (fp, ":%s", filename);
+                     fprintf (fp, "%s:", filename);
 
                    if (functionname != NULL && fmt[-1] == 'G')
-                     lfinfo (fp, ":%T", functionname);
-                   else if (filename != NULL)
-                     {
-                       if (linenumber != 0)
-                         fprintf (fp, ":%u", linenumber);
-                       else
-                         lfinfo (fp, ":(%A+0x%v)", section, offset);
-                     }
+                     lfinfo (fp, "%T", functionname);
+                   else if (filename != NULL && linenumber != 0)
+                     fprintf (fp, "%u", linenumber);
+                   else
+                     lfinfo (fp, "(%A+0x%v)", section, offset);
                  }
                else
                  lfinfo (fp, "%B:(%A+0x%v)", abfd, section, offset);