dlopen regression in 1.7? (or is it just me?)

Reini Urban rurban@x-ray.at
Tue Aug 11 19:35:00 GMT 2009


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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /