summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-12-16 15:40:36 +0000
committerNick Clifton <nickc@redhat.com>2004-12-16 15:40:36 +0000
commitf2763b012e379b77b8927ceb967223b6ea01e6a9 (patch)
treea517fb9e0d308533dfca63adf12dc3f865c3ce6e
parent7a6d0b32af1797bcf3713165118d98f15e6c6a82 (diff)
downloadppe42-binutils-f2763b012e379b77b8927ceb967223b6ea01e6a9.tar.gz
ppe42-binutils-f2763b012e379b77b8927ceb967223b6ea01e6a9.zip
* ldmisc.c (vfinfo): Handle the case where %B is passed a NULL BFD.
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldmisc.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 418bc939fe..478993b90a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-16 Martin Kögler <mkoegler@auto.tuwien.ac.at>
+
+ * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL
+ BFD.
+
2004-12-07 Ben Elliston <bje@gnu.org>
* ldemul.h: Forward declare struct option.
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 5f7d0e99aa..8fe0b43f14 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -188,7 +188,10 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
/* filename from a bfd */
{
bfd *abfd = va_arg (arg, bfd *);
- if (abfd->my_archive)
+
+ if (abfd == NULL)
+ fprintf (fp, "<none>");
+ else if (abfd->my_archive)
fprintf (fp, "%s(%s)", abfd->my_archive->filename,
abfd->filename);
else
OpenPOWER on IntegriCloud