From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1461 invoked by alias); 20 Apr 2012 21:20:39 -0000 Received: (qmail 1414 invoked by uid 22791); 20 Apr 2012 21:20:38 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qc0-f175.google.com (HELO mail-qc0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 21:20:22 +0000 Received: by qcso7 with SMTP id o7so6225311qcs.20 for ; Fri, 20 Apr 2012 14:20:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.75.142 with SMTP id y14mr2535319qcj.144.1334956821183; Fri, 20 Apr 2012 14:20:21 -0700 (PDT) Received: by 10.229.136.69 with HTTP; Fri, 20 Apr 2012 14:20:21 -0700 (PDT) In-Reply-To: <20120420165552.q36l2rh45cwwsokw-nzlynne@webmail.spamcop.net> References: <20120420165552.q36l2rh45cwwsokw-nzlynne@webmail.spamcop.net> Date: Fri, 20 Apr 2012 21:20:00 -0000 Message-ID: Subject: Re: RFC: Add STB_GNU_SECONDARY From: "H.J. Lu" To: Joern Rennecke Cc: "Ansari, Zia" , GCC Development , GNU C Library , Binutils Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00743.txt.bz2 On Fri, Apr 20, 2012 at 1:55 PM, Joern Rennecke wrote: > Quoting "H.J. Lu" : > >> Hi, >> >> We have a need to define a secondary symbol as backup in >> case there isn't a primary one. =A0Here is a proposal for >> STB_GNU_SECONDARY. =A0Any comments? > > > If two levels of prevedence (ordinary and weak) are not enough, why will > three levels be so much better? The main issues with weak symbols are 1. A global definition in shared object won't override a weak definition in relocatable file. 2. A global definition in archive won't override a weak definition in relocatable file. > If you use a signed fractional or even floating-point precedence value, > you have a lot more space to accomodate afterthoughts - above, below, > and in-between in precedence to existing values. We only have very few bits to in STB_XXX field. > Even better, you could use symbolic tags, and have the linker script > assign precedence values to these tags. It won't help us. --=20 H.J.