From f2763b012e379b77b8927ceb967223b6ea01e6a9 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 16 Dec 2004 15:40:36 +0000 Subject: [PATCH] * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL BFD. --- ld/ChangeLog | 5 +++++ ld/ldmisc.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 418bc939fee..478993b90ae 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-12-16 Martin Kögler + + * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL + BFD. + 2004-12-07 Ben Elliston * ldemul.h: Forward declare struct option. diff --git a/ld/ldmisc.c b/ld/ldmisc.c index 5f7d0e99aac..8fe0b43f148 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, ""); + else if (abfd->my_archive) fprintf (fp, "%s(%s)", abfd->my_archive->filename, abfd->filename); else -- 2.30.2