This is the mail archive of the
mailing list for the Cygwin project.
Re: dlopen(0, RTLD_LAZY) doesn't work?
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: "PsychoSphere" <psychosphere2k at yahoo dot com>,"Pavel Tsekov" <ptsekov at syntrex dot com>
- Cc: <cygwin at cygwin dot com>,<kent at watsen dot net>
- Date: Sat, 9 Feb 2002 07:05:12 +1100
- Subject: Re: dlopen(0, RTLD_LAZY) doesn't work?
- References: <firstname.lastname@example.org>
----- Original Message -----
From: "PsychoSphere" <email@example.com>
> > Don't learn this one - it's incorrect. Linking with
> > cygwin1.dll would
> > fail if it were correct.
> Wrong... declspec is ignored, as you will see if you
> nm the exe produced.
On what basis do you say this? I just tested this with a trivial test
case, and it fails to link (as expected) because... it's looking for the
We would have 1% of the portoing headaches we have if we could simply
__declspec everything and let --shared determine whether or not to obey
> > > > Also, the dllimport directive is never used
> > unless an
> > > > import library is created and used, which is not
> > the
> > > > idea here.
> > Again, this is incorrect. The dllimport directive
> > can be used when
> > linking directly to a .dll, no importlibrary
> > involved.
> An import library is automatically produced as you
> would see if you analyzed the sources!
Which sources. Libtool? Gcc? Binutils?. I've examined all of them to
greater and lesser degress. I rephrase: Using dllimport is orthogonal to
the _creation_ of an import library.
> If you could demonstrate your point using examples, I
> would be convinced. I have linked the cygwin1.dll
> without the declspec directives... furthermore, the
> dll after having symbols striped cannot be used as a
> substitute for an import library.
I was illustrating that "dllimport directive is never used unless an
import library is created AND used" was false, which only takes a single
counter example. (i.e. no creation of an import library, or no use
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html