delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/08/15:22:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <051701c1b0de$6236c770$0200a8c0@lifelesswks>
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>
References: <20020208115805 DOT 54479 DOT qmail AT web13508 DOT mail DOT yahoo DOT com>
Subject: Re: dlopen(0, RTLD_LAZY) doesn't work?
Date: Sat, 9 Feb 2002 07:05:12 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-OriginalArrivalTime: 08 Feb 2002 20:22:23.0766 (UTC) FILETIME=[51618B60:01C1B0DE]

===
----- Original Message -----
From: "PsychoSphere" <psychosphere2k AT yahoo DOT 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
_imp__symbol.

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
it.

>
> > > > 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
thereof.

Rob


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019