This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld --auto-import for cygwin and libtool


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]