This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: dlopen regression in 1.7? (or is it just me?)
- From: Reini Urban <rurban at x-ray dot at>
- To: cygwin at cygwin dot com
- Date: Tue, 11 Aug 2009 21:34:49 +0200
- Subject: Re: dlopen regression in 1.7? (or is it just me?)
- References: <4A81A300.6020104@lysator.liu.se>
2009/8/11 Peter Rosin:
> I trouble with dlopen in cygwin-1.7
> STC:
> $ cat simple.c
> int
> simple(void)
> {
> ? ? ? ?return 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 <stdio.h>
int
DllMain (void *h, int reason, void *static_load)
{
if (reason == 1)
puts("dll1 loaded");
else if (reason == 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?
--
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