aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
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 /ld/ldmisc.c
parent7a6d0b32af1797bcf3713165118d98f15e6c6a82 (diff)
downloadgdb-f2763b012e379b77b8927ceb967223b6ea01e6a9.zip
gdb-f2763b012e379b77b8927ceb967223b6ea01e6a9.tar.gz
gdb-f2763b012e379b77b8927ceb967223b6ea01e6a9.tar.bz2
* ldmisc.c (vfinfo): Handle the case where %B is passed a NULL BFD.
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c5
1 files changed, 4 insertions, 1 deletions
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