[PATCH] Fix LD test FAIL: application runtime segfault check on Cygwin
Sun Mar 15 06:37:00 GMT 2009
On Sat, Mar 14, 2009 at 05:45:41PM +0000, Dave Korn wrote:
> Hi all,
> The cygwin-specific test ld-autoimport/autoimport.exp links a DLL without
>supplying a -e option pointing to a suitable DllMain-style init function. In
>its absence, the first exported function in the DLL is taken to be the
>entrypoint, which is very wrong in this particular case as it's actually a
>test routine that calls printf(..), which doesn't work in early init, so the
>test app crashes when the runtime loader tries to start up the test DLL.
> The attached patch fixes that test by pointing the entrypoint at Cygwin's
>generic DllMain function, _cygwin_dll_entry(). Tested on Cygwin and it fixes
>the test; no other targets affected.
> Ok for head?
> * ld-auto-import/auto-import.exp: Add missing dll entrypoint.
More information about the Binutils