This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: coff-h8300 ld segfault
Alan Modra <amodra@bigpond.net.au> wrote:
> 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.
I'm happy with the workaround, but is there anything I should do to prevent
this bug from being forgotten?
Max.