X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4A81A300.6020104@lysator.liu.se> References: <4A81A300 DOT 6020104 AT lysator DOT liu DOT se> Date: Tue, 11 Aug 2009 21:34:49 +0200 Message-ID: <6910a60908111234s685cbd0ahbb7dce3a02b80d4a@mail.gmail.com> Subject: Re: dlopen regression in 1.7? (or is it just me?) From: Reini Urban To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 2009/8/11 Peter Rosin: > I trouble with dlopen in cygwin-1.7 > STC: > $ cat simple.c > int > simple(void) > { > =A0 =A0 =A0 =A0return 0; > } $ gcc -shared -o simple1.dll simple.c vs $ gcc -shared -o simple1.dll -Wl,-e,_simple simple.c Without entrypoint I get the same error, and this looks like my perl error. But with entrypoint I get the correct behaviour. My sample is: #include int DllMain (void *h, int reason, void *static_load) { if (reason =3D=3D 1) puts("dll1 loaded"); else if (reason =3D=3D 0) puts("dll1 unloaded"); } $ gcc -shared -o simple1.dll -Wl,-e,_DllMain simple.c > $ gcc -o reload reload.c > $ ./reload > one 0x63d80000, two 0x6ffc0000 > one 0x0, two 0x6ffc0000 With entry is is: $ ./reload.exe dll1 loaded one 0x61340000, two 0x64140000 dll1 unloaded dll1 loaded one 0x61340000, two 0x64140000 dll1 unloaded So it looks like I have to add an entry point to all my dll's now? --=20 Reini Urban http://phpwiki.org/ http://murbreak.at/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple