This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: target/9681: powerpc64 -frepo fails to instantiate some templates
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gcc-gnats at gcc dot gnu dot org, janis187 at us dot ibm dot com
- Date: Tue, 25 Feb 2003 21:31:20 +1030
- Subject: Re: target/9681: powerpc64 -frepo fails to instantiate some templates
- References: <20030212233713.29741.qmail@sources.redhat.com>
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