From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10073 invoked by alias); 25 Feb 2003 11:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10045 invoked by uid 71); 25 Feb 2003 11:06:00 -0000 Date: Tue, 25 Feb 2003 11:06:00 -0000 Message-ID: <20030225110600.10044.qmail@sources.redhat.com> To: amodra@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Alan Modra Subject: Re: target/9681: powerpc64 -frepo fails to instantiate some templates Reply-To: Alan Modra X-SW-Source: 2003-02/txt/msg01316.txt.bz2 List-Id: The following reply was made to PR target/9681; it has been noted by GNATS. From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org, janis187@us.ibm.com Subject: Re: target/9681: powerpc64 -frepo fails to instantiate some templates Date: Tue, 25 Feb 2003 21:31:20 +1030 This hack cures the powerpc64-linux -frepo failures. It should be safe enough to always drop a leading '.' rather than making this target-dependent, I think, but if this makes people nervous I'll introduce another #ifdef. * tlink.c (scan_linker_output): Drop leading '.' from symbol names. OK for mainline and 3.3? diff -urpN -xCVS -x'*~' gcc-ppc64-33.orig/gcc/tlink.c gcc-ppc64-33/gcc/tlink.c --- gcc-ppc64-33.orig/gcc/tlink.c 2003-01-12 08:18:20.000000000 +1030 +++ gcc-ppc64-33/gcc/tlink.c 2003-02-25 21:05:20.000000000 +1030 @@ -634,7 +634,13 @@ scan_linker_output (fname) /* Don't let the strstr's below see the demangled name; we might get spurious matches. */ if (p) - p[-1] = '\0'; + { + p[-1] = '\0'; + + /* powerpc64-linux references .foo when calling function foo. */ + if (*p == '.') + p++; + } /* We need to check for certain error keywords here, or we would mistakenly use GNU ld's "In function `foo':" message. */ -- Alan Modra IBM OzLabs - Linux Technology Centre