This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: C++ demangling of 64-bit symbols on ppc64
Maynard Johnson <maynardj@us.ibm.com> writes:
> 6513 93.7392 test ._Z4doitPc
So the problem is the leading dot (which was probably clear to you but
not to me). Historically the demangler has not handled leading dots.
Instead, historically, the caller has removed them when appropriate.
The linker, rather than do anything clever, simply removes all leading
dots. See the demangle() function in ld/ldmisc.c.
/* 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 to avoid
confusing the demangler. */
p = name;
while (*p == '.')
++p;
It seems to me that opreport should do the same.
Or, we could change the interface to the demangler. I don't think it
would be appropriate for the demangler to unconditionally remove
leading dots, but I think it would be reasonable to add a DMGL_XX flag
for it if that seems like a better approach.
Ian