From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9258 invoked by alias); 3 Jan 2003 01:35:51 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 9244 invoked from network); 3 Jan 2003 01:35:49 -0000 Received: from unknown (HELO are.twiddle.net) (64.81.246.98) by 209.249.29.67 with SMTP; 3 Jan 2003 01:35:49 -0000 Received: (from rth@localhost) by are.twiddle.net (8.11.6/8.11.6) id h031YMF21244; Thu, 2 Jan 2003 17:34:22 -0800 Date: Fri, 03 Jan 2003 01:35:00 -0000 From: Richard Henderson To: John David Anglin Cc: prj@po.cwru.edu, gcc@gcc.gnu.org, libc-alpha@sources.redhat.com Subject: Re: Miscompilation of glibc with CVS mainline Message-ID: <20030102173422.A21225@twiddle.net> References: <20030102141018.A20498@twiddle.net> <200301030102.h0312IXQ012013@hiauly1.hia.nrc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200301030102.h0312IXQ012013@hiauly1.hia.nrc.ca>; from dave@hiauly1.hia.nrc.ca on Thu, Jan 02, 2003 at 08:02:18PM -0500 X-SW-Source: 2003-01/txt/msg00085.txt.bz2 On Thu, Jan 02, 2003 at 08:02:18PM -0500, John David Anglin wrote: > Isn't it possible for both a global define and weak defines to occur > when a program is linked without incuring an error in the system V ABI? Sure. However, a strong use of a symbol *always* requires the symbol to be defined. If GCC sees that a symbol is used, and it is not declared weak, then it knows that that symbol *must* be defined. The weakness of the definition doesn't enter into it. > I think Ulrich has a point in questioning whether the optimization is > useful. On the contrary. The optimization is *extremely* useful. Just as useful as exposing the .hidden directives to the compiler. > To get the old behavior users are now forced to use > something like gcc's TARGET_ATTRIBUTE_WEAK macro. Yes. IMO code that used inline assembly for this was simply broken. r~