This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problem with linker with binutils-040414
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: Daniel Kulp <dan at kulp dot com>
- Date: Thu, 15 Apr 2004 09:48:03 +0100
- Subject: Re: Problem with linker with binutils-040414
- References: <200404141243.36254.dan@kulp.com>
Hi Guys,
Daniel Kulp wrote:
I have confirmed that on line 3637 of elflink.c, old_bfd is null and thus
the call to bfd_archive_filename cores.
In line with this suggestion I am going to apply the following patch to
stop bfd_archive_filename() seg-faulting when it is passed a NULL bfd
pointer.
Daniel - Do you want me to apply this to the 2.15 branch ?
Cheers
Nick
bfd/ChangeLog
2004-04-15 Nick Clifton <nickc@redhat.com>
* bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
Index: bfd/bfd.c
===================================================================
RCS file: /cvs/src/src/bfd/bfd.c,v
retrieving revision 1.55
diff -c -3 -p -r1.55 bfd.c
*** bfd/bfd.c 24 Nov 2003 18:06:39 -0000 1.55
--- bfd/bfd.c 15 Apr 2004 08:47:30 -0000
*************** DESCRIPTION
*** 512,517 ****
--- 512,520 ----
const char *
bfd_archive_filename (bfd *abfd)
{
+ if (abfd == NULL)
+ return _("<unknown>");
+
if (abfd->my_archive)
{
static size_t curr = 0;