delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/04/27/12:23:56

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
Message-ID: <3CCAD135.8030901@ece.gatech.edu>
Date: Sat, 27 Apr 2002 12:26:29 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
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>
Subject: Re: Excude whole libs when building w32 dlls with -export-all
References: <FC169E059D1A0442A04C40F86D9BA7600C5F2E AT itdomain003 DOT itdomain DOT net DOT au>

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.

 
> That would remove the need for many default exclusions, and be closer to
> unix behaviour (as I understand it).


We already exclude symbols beginning with _imp_, and Ralf's patch (well, 
part of it, IIRC) adds an additional exclusion for symbols beginning 
with _nm_.  And, of course, the data thunks _fu0_ are never re-exported.

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.

Danny is addressing Ralf's long-desired ability to exclude symbols from 
static convenience libraries that are used by multiple KDE dlls. 
Without this ability, multiple KDE DLLs have export the same symbols, 
leading to linking errors when building apps.  This has forced Ralf to 
se a specially hacked binutils for all KDE builds.

I like Danny's patch, as it is more flexible than the one Ralf has been 
using (Ralf's was basically: " --exclude-libs -lfoo -bar 
--no-exclude-libs -baz" IIRC, so that symbols from libfoo and libbar 
would not be exported, but symbols from libbaz would be).

Ordinarily, at this point, I'd say: "I'll build a binutils and give your 
patch a try" -- except for the reports that say binutils has been broken 
on x86 since mid-December.  I *really* don't have the time right now to 
track THAT down, just to test Danny's patch -- I'm in hardcore 
dissertation mode, right now...

--Chuck

- Raw text -


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