Invalid lvalue assignment in ld/emultempl/pe.em with GCC trunk

Nick Clifton nickc@redhat.com
Tue Oct 19 09:26:00 GMT 2004


Hi Danny,

> pe.em:1024: if (is->the_bfd->my_archive)
> 
> However, that conditional at pe.em:1024 may be wrong judging from the
> ChangeLog entry that introduced the local bfd_filename macro
> 
> 2004-08-27 Nick Clifton <nickc@redhat.com>
> 
> 	* emultempl/pe.em (after_open): Do not assume that either bfd is
> 	an archive.
> 
> If line 1024 is correct, then attached will fix, else I'll submit a revised
> patch. Nick, can you give me an example where one or both of the input bfds
> is not archive?

No I cannot. :-(  I did have a test case from a message posted on the 
bug-binutils list, but that list is not being archived and I managed to 
delete the test during one of my global rebuild everything phases.

I do know that there definitely was a case where other_bfd->my_archive 
was NULL.  It may have been on due to erroneous input to the linker, but 
the intent of the patch was to prevent a seg-fault from indirecting 
through a NULL pointer.  The use of the bfd_filename() macro on the 
is->the_bfd variable was an oversight however.  I missed the check at 
line 1024.

So, please consider your patch approved.

Cheers
   Nick



More information about the Binutils mailing list