aboutsummaryrefslogtreecommitdiff
path: root/ld
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
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')
-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