From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26755 invoked by alias); 26 Jul 2002 05:30:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26692 invoked from network); 26 Jul 2002 05:30:50 -0000 Received: from unknown (HELO egil.codesourcery.com) (66.92.14.122) by sources.redhat.com with SMTP; 26 Jul 2002 05:30:50 -0000 Received: from zack by egil.codesourcery.com with local (Exim 3.35 #1 (Debian)) id 17Xxge-0004KX-00; Thu, 25 Jul 2002 22:30:48 -0700 Date: Thu, 25 Jul 2002 23:54:00 -0000 From: Zack Weinberg To: Richard Henderson , gcc-patches@gcc.gnu.org, Andrew Pinski Subject: Re: RFC/RFA: Improve definition of ASM_OUTPUT_MEASURED_SIZE Message-ID: <20020726053048.GA16614@codesourcery.com> References: <20020726002049.GD760@codesourcery.com> <20020725185339.C27268@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020725185339.C27268@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-07/txt/msg01550.txt.bz2 On Thu, Jul 25, 2002 at 06:53:39PM -0700, Richard Henderson wrote: > On Thu, Jul 25, 2002 at 05:20:49PM -0700, Zack Weinberg wrote: > > It seems to me that any assembler with a > > .size directive ought to be modern enough to accept the expression > > ".-foo". > > I don't think this is actually true. Better try this > on Solaris, Irix, and SCO. Robert Lipe has reported it works on SCO. On Solaris, $ cat test.s .section ".text" .global foo .type foo,#function foo: retl sll %o0, 1, %o0 .size foo, .-foo $ /usr/ccs/bin/as -V test.s as: Sun WorkShop 6 99/08/18 $ nm test.o [Index] Value Size Type Bind Other Shndx Name [1] | 0| 0|SECT |LOCL |0 |2 | [2] | 0| 8|FUNC |GLOB |0 |2 |foo $ uname -a SunOS chili 5.8 Generic_108528-10 sun4u sparc SUNW,Ultra-5_10 2.8 is recent, yes, but the datestamp on that assembler is quite old. (I no longer remember how to find out what patches have been applied to a specific file.) I have no access to IRIX. > I'd be willing to go the other way and always use the intermediate > symbol though. I'd be willing to do that if we have to, but if we can make .-sym work on all or even most of these systems I think that's a cleaner solution. zw