Subject: Re: beta18: building gdb gives incomplete import table [and other problems]???
From: [email-masked] (Fergus Henderson)

30 Dec 1997 18:28:08 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: Steven Reddie <[email-masked]>
Cc: [email-masked]

On 30-Dec-1997, Steven Reddie <[email-masked]> wrote:
> Further to yesterdays post, I have succeeded in getting gdb to compile and
> run but I am still confused about what's going on.  The linker still seems
> faulty.
....
> This would successfully compile but crash immediately when executed.  The
> crash was on the call to GetModuleHandle() which is called from cygwin_crt0.
> To fix this crash, I removed the -lkernel32 from the gdb/Makefile and
> re-linked.  It appears that the -lkernel32 somehow looses the import table
> from libcygwin32.a.

One bug with the linker that has been mentioned on this list previously
is that if the same library name is mentioned twice on the link line,
then the linker generates executables that crash.  `-lkernel32' is
linked in by default, so if you mention it explicitly then it will
get linked in twice, causing the symptoms you observed.

-- 
Fergus Henderson <[email-masked]>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger [email-masked]         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".