This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix LD test FAIL: application runtime segfault check on Cygwin
- From: Christopher Faylor <cgf-use-the-mailinglist-please at sourceware dot org>
- To: binutils at sourceware dot org
- Date: Sun, 15 Mar 2009 02:36:48 -0400
- Subject: Re: [PATCH] Fix LD test FAIL: application runtime segfault check on Cygwin
- References: <49BBED45.1010802@gmail.com>
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/testsuite/ChangeLog
>
> * ld-auto-import/auto-import.exp: Add missing dll entrypoint.
Yes.
cgf