public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* XCOFF/PE hack removal
@ 2002-01-22  1:54 Alan Modra
  2002-01-22 11:10 ` Tom Rix
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2002-01-22  1:54 UTC (permalink / raw)
  To: binutils

I'd like to apply the following so that errors reported when linking
powerpc64-elf objects discern between a function descriptor symbol
and it's associated function code symbol, which only differs by a
leading dot.  However, this will affect PE and XCOFF error messages,
so I'd like an OK from the opposition camp first.  If not OK, then
I'll do something target dependent.

ld/ChangeLog
	* ldmisc.c (demangle): Put back dots when string not demangled.
 
-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Index: ld/ldmisc.c
===================================================================
RCS file: /cvs/src/src/ld/ldmisc.c,v
retrieving revision 1.8
diff -u -p -r1.8 ldmisc.c
--- ldmisc.c	2001/09/26 01:55:44	1.8
+++ ldmisc.c	2002/01/22 09:08:55
@@ -69,6 +69,7 @@ demangle (string)
      const char *string;
 {
   char *res;
+  int dots = 0;
 
   if (output_bfd != NULL
       && bfd_get_symbol_leading_char (output_bfd) == string[0])
@@ -78,9 +79,13 @@ demangle (string)
      format.  Xcoff has a single '.', while the NT PE for PPC has
      '..'.  So we remove all of them.  */
   while (string[0] == '.')
-    ++string;
+    {
+      ++dots;
+      ++string;
+    }
 
   res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS);
+  string -= dots;
   return res ? res : xstrdup (string);
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-25 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22  1:54 XCOFF/PE hack removal Alan Modra
2002-01-22 11:10 ` Tom Rix
2002-01-25  5:04   ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).