delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/11/21/16:52:06

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: <20011121200520.57908.qmail@web14506.mail.yahoo.com>
Date: Thu, 22 Nov 2001 07:05:20 +1100 (EST)
From: =?iso-8859-1?q?Danny=20Smith?= <danny_r_smith_2001 AT yahoo DOT co DOT nz>
Subject: Re: ld ---export--all --exclude-libs,?
To: cygwin-apps AT cygwin DOT com
In-Reply-To: <20011121110829.B24327@cygbert.vinschen.de>
MIME-Version: 1.0

 --- Corinna Vinschen <vinschen AT redhat DOT com> wrote: > On Wed, Nov 21, 2001
at 07:41:58PM +1100, Danny Smith wrote:
> > Hello, I'm after some criticism, before submitting this to binutils.
> > 
> > IMO, the auto-export feature of ld needs (at least) an option to
> exclude
> > whole libs from export. The following patch does that. It also adds a
> few
> > more default lib excludes and scans for backward compat implib symbols
> > (__imp_) 
> > 
> > I think this patch doesn't do enough.
> > 
> > My preference would be to exclude *all* libs by default, with a command
> > line option to explicity *include* named libs.  Why? It is too easy for
> > licensed library code to sneak into dll's using --export-all. This
> affects
> > distributability (sic) of the dll and apps dependent on the dll.
> > The user may be unaware of this infection because its automatic.
> > At least make the user think about what she/he is exporting.
> > 
> > I will gladly throw away the following to work on a patch to exclude
> all
> > libs by default if given encouragement.
> > 
> > Any comments.
> 
> Yes, a question.  First note that I'm a binutils (l)user, not a
> developer so I apologize for being thick.  Now the question:
> 
> Isn't the functionality you're searching for already in ld given by
> the --no-whole-archive options?
> 
>   gcc -shared -o cygfoo.dll $(OBJ)
>       -Wl,--out-implib,libfoo.dll.a
>       -Wl,--no-whole-archive -lbar -lbaz
> 
> Or am I missing the point?
> 
> Corinna
> 

That does'nt do it.  For example,  if my dll uses lbasename from
libiberty.a,  --export-all,--no-whole-archive will still export the
libiberty symbols 
_sch_istable
_sch_tolower
_sch_toupper
lbasename

The  --exclude-libs option would exclude those symbols from the exports.
Danny
 


http://shopping.yahoo.com.au - Yahoo! Shopping
- Get organised for Christmas early this year!

- Raw text -


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