From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 336 invoked by alias); 20 Apr 2012 22:55:13 -0000 Received: (qmail 32750 invoked by uid 22791); 20 Apr 2012 22:55:10 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from pasky.or.cz (HELO machine.or.cz) (84.242.80.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 22:54:48 +0000 Received: by machine.or.cz (Postfix, from userid 2001) id 0D9531700031; Sat, 21 Apr 2012 00:54:44 +0200 (CEST) Date: Fri, 20 Apr 2012 22:55:00 -0000 From: Petr Baudis To: "H.J. Lu" Cc: Roland McGrath , "Ansari, Zia" , GCC Development , GNU C Library , Binutils Subject: Re: RFC: Add STB_GNU_SECONDARY Message-ID: <20120420225444.GP24309@machine.or.cz> References: <20120420195056.D92382C05B@topped-with-meat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00747.txt.bz2 On Fri, Apr 20, 2012 at 01:11:34PM -0700, H.J. Lu wrote: > On Fri, Apr 20, 2012 at 12:50 PM, Roland McGrath wrote: > > Please provide an example that illustrates why you think you need this. > > > > Currently we use weak undefined symbol, foo, to do > > if (&foo != 0) > foo is defined. > else > foo isn't defined. > > We want is to define foo as a secondary symbol so that > we can always use foo without checking. If there is a primary > one in a .o file and .so file, we will get the primary one, > otherwise, we will use the secondary one. This is still a very general example. Does this concern a particular software package? Couldn't you use IFUNC to perform the if-statement above and supply the proper function? Petr "Pasky" Baudis