C++ demangling of 64-bit symbols on ppc64
Maynard Johnson
maynardj@us.ibm.com
Thu Apr 5 13:10:00 GMT 2007
Ian Lance Taylor wrote:
>Maynard Johnson <maynardj@us.ibm.com> writes:
>
>
>
>>As the de facto maintainer of the ppc64 bits of oprofile, I was
>>recently asked to look into an oprofile bug where it was incorrectly
>>demangling 64-bit symbols. The oprofile code uses the libiberty
>>function, cplus_demangle(), but is not getting back the right answer
>>for ppc64 64-bit symbols. This appears to be more fallout from the
>>change (made a couple years ago or so) to the opd for ppc64, where the
>>leading "." was removed from 64-bit symbols.
>>
>>I hacked around the problem in my private oprofile src tree, but I'm
>>thinking this issue should be solved at its source. I'm seeing this
>>problem on a SLES 10 system with binutils version 2.16.91. Has this
>>possibly been resolved in a more recent binutils version or in CVS?
>>
>>
>
>Can you give an example of a symbol which the demangler is not
>handling correctly?
>
>
Below is the testcase provided to me by the person who reported it:
==========
void doit(char *str)
{
while (1)
;
}
char *blah;
int main()
{
doit(blah);
}
When built as 32bit:
# g++ -O2 test.c -o test
opreport -l gives:
42345 89.6627 test doit(char*)
However when built as 64bit:
# g++ -m64 -O2 test.c -o test
opreport -l gives:
6513 93.7392 test ._Z4doitPc
=================
Regards,
-Maynard
>Ian
>
>
More information about the Binutils
mailing list