This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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!

Peter
-- 
Peter O'Gorman
pogma@thewrittenword.com

Attachment: copy_name.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]