From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29814 invoked by alias); 26 Apr 2005 02:40:15 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 29695 invoked from network); 26 Apr 2005 02:40:01 -0000 Received: from unknown (HELO rwcrmhc13.comcast.net) (204.127.198.39) by sourceware.org with SMTP; 26 Apr 2005 02:40:01 -0000 Received: from lucon.org ([24.6.212.230]) by comcast.net (rwcrmhc13) with ESMTP id <20050426024001015004vnvne>; Tue, 26 Apr 2005 02:40:01 +0000 Received: by lucon.org (Postfix, from userid 1000) id B65C663D5D; Mon, 25 Apr 2005 19:39:27 -0700 (PDT) Date: Tue, 26 Apr 2005 02:40:00 -0000 From: "H. J. Lu" To: David Wuertele Cc: binutils@sources.redhat.com Subject: Re: How do I link to a shared lib without having that lib's dependencies (the way MS link does) Message-ID: <20050426023927.GA10578@lucon.org> References: <20050425232858.GA7803@lucon.org> <20050426003307.GA8753@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050426003307.GA8753@lucon.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-04/txt/msg00694.txt.bz2 On Mon, Apr 25, 2005 at 05:33:07PM -0700, H. J. Lu wrote: > On Mon, Apr 25, 2005 at 04:42:30PM -0700, David Wuertele wrote: > > HJL> Here is something you can try. You need to pass > > HJL> -Wl,--ignore-needed libA.so -Wl,--no-ignore-needed > > HJL> to gcc. > > > > I was hoping for something simpler that I could give to users of my > > SDK. I don't mind warnings, I just mind the erroring out when there > > If you want to give your users a libA.so, which isn't fully functional > at link-time, why not give them a dummy libA.so with the same ABI > for link-time only? I assume your run-time environment is different > from link-time. Of course, they can't use the dummy libA.so for the > the run-time environment. > > > is really no error. Does anyone besides me consider the default I think "ld --allow-shlib-undefined" will allow unresolved references in shared libaries. H.J.