aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-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 418bc93..478993b 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 5f7d0e9..8fe0b43 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