delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/07/23/22:02:38

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Message-ID: <3B5CD735.9010106@ece.gatech.edu>
Date: Mon, 23 Jul 2001 22:02:29 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010713
X-Accept-Language: en-us
MIME-Version: 1.0
To: cygwin-apps AT Cygwin DOT Com
Subject: Re: ld --auto-import for cygwin and libtool
References: <02a701c11289$bc8b9b90$562fa4cb AT co3007967a> <007e01c112b0$a6de11c0$806410ac AT local> <033a01c112b2$306e53e0$562fa4cb AT co3007967a> <3B5B0686 DOT 5050500 AT ece DOT gatech DOT edu> <009d01c11315$90a94d60$562fa4cb AT co3007967a> <20010722224246 DOT D9168 AT redhat DOT com> <010501c11321$d1b7d9a0$562fa4cb AT co3007967a> <20010722230939 DOT F9168 AT redhat DOT com> <3B5C2779 DOT A26BC5FF AT yahoo DOT com> <3B5C5A45 DOT 4030705 AT ece DOT gatech DOT edu> <20010723143435 DOT B888 AT redhat DOT com>

>>Earnie Boyd wrote:
>>>Don't be too hastily convinced.  I believe there to be problems of
>>>exporting too much in lots of cases.


Perhaps.  But since the auto-exports stuff doesn't happen if you've 
decorated (__declspec()) or use .def files, I don't see how this matters 
too much.  Existing code should continue to work, since existing 
packages (even mingw ones) are using __declspec/.def, right?

However, a new package -- one that is dll-ized using the auto-exports 
functionality -- might have problems.  E.g. if you have interdependent 
dll's or problems similar to those that Ralf is reporting:

   two dll's both include a static archive, and each exports all symbols 
in that archive.  Then an .exe links to both dll's and the link fails 
due to duplicate symbols.

Well, that's bleeding edge -- and can be fixed in the next go-round with 
additional refinements (perhaps --exclude-imports <foo.a>).  For simple 
cases ("normal" dll's that are built without what libtool calls "static 
convenience libraries) the auto-imports mechanism, and the 
export-all+filtering mechanism, just works. (*)  The point is, you don't 
see that problem unless you're actively trying to use the new 
auto-export feature.  Don't use the feature (since it's not on by 
default) and you won't get burned; just use __declspec/.def methods 
instead (like you've been required to do for ever).

(*)Look for some of in-practice test results concerning new 
(auto-import/export-all-filtered, and old-style dll's) in an upcoming 
message.


>>
>>Are we talking about Paul's --export-all-symbols/filtering changes, or 
>>his auto-imports changes (Currently, both changes are commingled in a 
>>single patch.  I think.)
>>
> 
> Actually, I think that Paul submitted the --export-all-symbols patch to
> binutils for approval, where it has languished for a while.


correct. it has not yet been accepted into CVS.


> He specifically did not include the auto-import stuff.  I don't remember
> if the auto-import patch also included export-all-symbols but I don't
> believe that the  converse is true.


I think(**) Paul's original auto-import patch did not have the 
symbol-filtering stuff.  He then ran into problems, developed the 
symbol-filtering patch you mentioned.

I believe Paul's *current* auto-exports patch *does* include the 
symbol-filtering -- but only because the sym-filt patch hasn't made it 
into CVS and he needs both.  Similarly, Robert's version of Paul's 
auto-exports patch *also* includes the symb-filt stuff (because, as 
Robert pointed out, it's absolutely necessary in that context).

(**) I'm not just blathering; I've actually tracked down the various 
patches and manually compared them.  However, I may have overlooked 
something, so I'm not 100 percent sure of my analysis, above.

--Chuck




- Raw text -


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