coff-h8300 ld segfault

Alan Modra amodra@bigpond.net.au
Tue Dec 3 15:16:00 GMT 2002


On Tue, Dec 03, 2002 at 08:49:42PM -0000, Max Bowsher wrote:
> The problem is caused by OUTPUT_FORMAT("symbolsrec") in a linker script.
> This confuses ld into creating the wrong sort of hash table (even though
> OUTPUT_ARCH(h8300) is present).
> 
> Also, my statement about binutils 2.12 was misleading. I've since discovered
> that the logic bug does occur in binutils 2.12, and I dare say earlier
> versions as well. However, it just happens that the memory that gets
> overwritten was critical enough to cause a segfault until version 2.13.

OK, no testcase needed.  Yes, the bug is that h8300_bfd_link_add_symbols
uses h8300_coff_hash_table without first checking the hash table
creator.  I fixed a bunch of similar bugs in ELF targets with my
2002-04-16 bfd change.  Until one of the COFF maintainers looks at this
problem, I'm afraid you'll need to link to COFF output, then use
objcopy to convert to srec.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list