This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: target/9681: powerpc64 -frepo fails to instantiate some templates


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]