[PATCH-bfd] i386-mingw32-ld crash on x86_64 linux

Dave Korn dave.korn.cygwin@googlemail.com
Sun Apr 19 11:53:00 GMT 2009


Peter O'Gorman wrote:
> On Sat, Apr 18, 2009 at 06:47:07PM +0100, Dave Korn wrote:
>>   I'm not sure that bfd_make_section_anyway_with_flags copies the name.  I
>> think it stashes the value of the pointer passed in (twice in fact, once in
>> the asection itself and once in the root bfd_hash_entry to which the section
>> is anchored), so we do need to allocate some memory after all.  So I'll try
>> re-adding that and we'll see if it helps.
>>
> 
> Yes, that seems to be it! If I add a bfd_alloc and strcpy, it works.
> 
> Attached is what I used to test (your patch + alloc & copy).
> 
> Thank you!

  Brilliant.  I'll run it through a full testsuite and we'll see about getting
it checked in.  Thanks for contributing :)

    cheers,
      DaveK



More information about the Binutils mailing list