This patch is to strip off the leading '.' generated on elf64-powerpc
targets (esee http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00557.html)
that prevents proper demangling. The bfd_demangle() wrapper created in
binutils by Alan Modra
investigated, but it involves an additional 'bfd *' parameter that was
not required by cplus_demangle(). This parameter allows bfd_demangle()
to call bfd_get_symbol_leading_char () to allow bfd_demangle() to strip
leading underscores that cannot be stripped unconditionally. I looked
through the call paths for cplus_demangle() and found that the 'bfd *'
parameter is not readily available.
If we were to try and do the contortions required to call bfd_demangle()
it would involve saving the bfd for every object file and storing a
pointer to it in the symbol data structure, and some .configure wizardry
to determine whether or not bfd_demangle() is available. I wasn't
convinced that it was worth the effort.
How does demangling work(not work) in Oprofile on systems that prepend a
leading "_"? Do you get _foo() vs. foo(), or do you get the mangled
name with an extra leading underscore? If it's the former, I think that