From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: Re: DLL init patch for loading cygwin DLL from MSVC app 28 Oct 1998 19:06:42 -0800 Message-ID: References: <19981028213210 DOT A20153 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: Christopher Faylor Cc: cygwin32-developers AT cygnus DOT com, noer AT cygnus DOT com On Wed, 28 Oct 1998, Christopher Faylor wrote: > > Did you ever manage to get an strace log on this? It sounds like that > would pinpoint the problem pretty quickly. > Actually, there are multiple problems. dll_crt0 is probably really only appropriate for a cygwin app, and not for a cygwin dll loaded in a non- cygwin app. If we call dll_crt0, here's some of the problems I see: - the first problem is that the global constructors are called multiple times; - it calls exit (user->main), so that needs to be take care, possibly by saving the DLL main, NULL'ing it and then calling dll_crt0. This is the easiest one to get around; - then the initialization hangs in sigproc_init() -- in makethread; I think we need to do more than just call dll_crt0 to initialize ... Regards, Mumit