This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: XCOFF/PE hack removal
On Tue, Jan 22, 2002 at 08:51:52AM -0600, Tom Rix wrote:
> You should add powerpc64-elf to the list of targets in the comment.
True. Checking in this modified patch.
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/25 12:13:55
@@ -69,18 +69,20 @@ demangle (string)
const char *string;
{
char *res;
+ char *p;
if (output_bfd != NULL
&& bfd_get_symbol_leading_char (output_bfd) == string[0])
++string;
- /* This is a hack for better error reporting on XCOFF, or the MS PE
- format. Xcoff has a single '.', while the NT PE for PPC has
- '..'. So we remove all of them. */
- while (string[0] == '.')
- ++string;
+ /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
+ or the MS PE format. These formats have a number of leading '.'s
+ on at least some symbols, so we remove all dots. */
+ p = string;
+ while (*p == '.')
+ ++p;
- res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS);
+ res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
return res ? res : xstrdup (string);
}