[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SEGV in ld on Cygwin
From: |
Nick Clifton |
Subject: |
Re: SEGV in ld on Cygwin |
Date: |
30 Apr 2003 09:54:24 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 |
Hi Eric,
> GNU ld version 2.13.90 20030308
The first thing to try is to download the latest binutils sources from
the CVS repository or nightly tarball. It may well be that this bug
has been fixed in these sources.
> #0 0x610ba1fd in strncmp () from /usr/bin/cygwin1.dll
> #1 0x004374e5 in pe_implied_import_dll (filename=0x22f8e0
Since the linker is dying in the call strncmp, the next most obvious
thing to do is to add debugging/breakpoints around the call inside
pe_implied_import_dll(). My guess is that the variable 'erva' will be
NULL.
> Unfortunately I don't understand how the linker works, so debugging
> it is very slow going. All I've found so far is that
> pe_implied_import_dll assigns the value 0 to the variable
> export_size, which seems suspicious, since it later mallocs that
> many (i.e., 0) bytes.
Export_size is extracted from the dll that is being linked in. You
could try adding a simple test when it is extracted. If it is zero,
print an error message and return FALSE. You could also print out the
contents of the optional header and see if they make sense.
Cheers
Nick