This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
RE: Excude whole libs when building w32 dlls with -export-all
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: "Charles Wilson" <cwilson at ece dot gatech dot edu>
- Cc: "Danny Smith" <danny_r_smith_2001 at yahoo dot co dot nz>,"binutils" <binutils at sources dot redhat dot com>,"cygwin-apps" <cygwin-apps at cygwin dot com>
- Date: Sun, 28 Apr 2002 03:35:33 +1000
- Subject: RE: Excude whole libs when building w32 dlls with -export-all
> -----Original Message-----
> From: Charles Wilson [mailto:cwilson@ece.gatech.edu]
> Sent: Sunday, April 28, 2002 2:26 AM
> To: Robert Collins
> Cc: Danny Smith; binutils; cygwin-apps
> Subject: Re: Excude whole libs when building w32 dlls with -export-all
>
>
> Robert Collins wrote:
>
>
> > Can we detect libs and automatically exclude symbols from shared
> > libraries?
> >
> > i.e. when linking against libcygwin.a, ALL symbols therein
> are from a
> > dll, so -by default- should not be exported.
>
>
> Picky point: that's not true in this case. libcygwin.a, unlike most
> import libs, contains actual code as well as import thunks
> for cygwin1.dll.
Yeah well :}. Actually most import libs can be considered to contain
code - that's what the standard stub is. The important point is not to
*ignore* the library, but to not *re-export* it's symbols.
> I dunno if we need something *less* granular (e.g. never never never
> export ANY symbol of ANY kind that comes from *.dll) ...
> maybe so. But,
> this is a separate argument from Danny's proposed patch.
True. However the current code in ld is a kludge. Always has-been, and
if not fixed... always will-be.
I too like the patch Danny has put forward, (not that I didn't speak
against it :]). I'm hoping to review Ralf's patch tomorrow & will try
and get to Danny's as well. I'm going to test on a non-HEAD ld, and if
that works correctly, then IMO it can go into HEAD... as long as that
part hasn't altered significantly between my testpoint and HEAD.
Rob