This is the mail archive of the binutils@sources.redhat.com 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: coff-h8300 ld segfault


Alan Modra <amodra@bigpond.net.au> wrote:

> On Mon, Dec 02, 2002 at 08:14:08PM -0000, Max Bowsher wrote:
>> Yes, I agree that link_info.hash isn't a h8300_coff_hash_table, but
>> instead something smaller, so vectors_sec is outside the malloced
>> region.But: I am linking coff-h8300 objects - as produced by
>> h8300-hms targeted gcc and IDed by h8300-hms-objcopy -x.Some of the
>> functions in the object are resolved via a linker script, not in a
>> more normal way - I don't know if this is relevant.But this did work
>> with binutils 2.12.
>
> Please provide a small testcase, ie. since this is a linker problem,
> a set of small object files and the linker script that reproduces the
> problem.

I'm unable to reduce the problem to a testcase, but fortuately, that is no
longer necessary, as I've reduced it even further:

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.


Max.


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