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: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <20011121201434.77597.qmail@web14502.mail.yahoo.com> Date: Thu, 22 Nov 2001 07:14:34 +1100 (EST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: RE[2]: ld ---export--all --exclude-libs,? To: Cygwin-Apps In-Reply-To: <009201c17271$4cad9600$405e07d5@BRAMSCHE> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit --- Ralf Habacker wrote: > > -----Original Message----- > > From: cygwin-apps-owner AT sourceware DOT cygnus DOT com > > [mailto:cygwin-apps-owner AT sourceware DOT cygnus DOT com]On Behalf Of Robert > > Collins > > Sent: Wednesday, November 21, 2001 9:47 AM > > To: Danny Smith; cygwin-apps; mingw-dvlpr > > Subject: Re: ld ---export--all --exclude-libs,? > > > > > > IIRC the reason the auto-export feature didn't automatically prevent > > forwarded exports was we didn't know how. I had a quick look at doing > > that when I tweaked Paul's work to also exlude the cygwin common > > symbols. > > > > If you've found how to detect forward exports coming from other > > libraries, then _please_ make excluding those the default. In fact IMO > > such symbols should require explicit source code decoration -say via > the > > .def file- to create as AFAIK there is no ELF equivalent to a forwarded > > symbol. > > > Currently I'm using a patched binutils for compiling kde which exclude > all *.a libs inm > conjunction with libtool. > > To export specific libs, I'm using the "no whole archive" options of > libtool, which unpacks > the archive and adds each objfile. > Additional this is nessessary if you are using static libs in more than > one dll. > > Index: pe-dll.c > =================================================================== > RCS file: /cvs/src/src/ld/pe-dll.c,v > retrieving revision 1.37 > diff -u -b -B -p -r1.37 pe-dll.c > --- pe-dll.c 2001/10/19 14:25:51 1.37 > +++ pe-dll.c 2001/11/21 09:35:22 > @@ -231,6 +237,8 @@ static autofilter_entry_type autofilter_ > { "libgcc.", 7 }, > { "libstdc++.", 10 }, > { "libmingw32.", 11 }, > +// RH: workaround to allow using static libs in multiple dlls > + { ".a", 2 }, > { NULL, 0 } > }; > > Ralf > > Yes, something like that is my preference: exclude all libs char * libname; if (abfd && abfd->my_archive && libname = lbasename (abfd->my_archive->filename)) /* Check if explicitly listed as an included lib. If not */ return 0; Danny http://shopping.yahoo.com.au - Yahoo! Shopping - Get organised for Christmas early this year!