Patch question for binutils files include/demangle.h and libiberty/cplus-dem.c
Nathan Tallent
eraxxon@alumni.rice.edu
Tue Oct 8 08:53:00 GMT 2002
Patch Question for binutils files:
include/demangle.h
libiberty/cplus-dem.c
I am wondering if it might be possible to add another entry point to the
'cplus_demangle' function.
Let me explain just a little. We are using bintuils as the binary reader
for a program that performs source code structure recovery on binaries from
a number of different platforms and compilers. (We esp. focus on loop
recovery for scientific programs.) One of the platforms that we want to
support is Sun Solaris under the Sun and GCC C++ compilers. Because of
this, we'd like to be able to link in both the Sun and GCC demangler.
Unfortunately both function prototypes are identical, which means that
linking mismatches can happen, leading to runtime disaster.
While I figured that changing the name of GNU's cplus_demangle was not an
option, I thought that adding a new entry point or wrapper named something
like 'gnu_cplus_demangle' might be possible. (I would then avoid linking
problems by using objcopy to change the linkage of GNU's 'cplus_demangle'
to
WEAK.)
I have successfully been using such a scheme for a while now. Would
it be possible to submit these changes for inclusion in future versions
of GCC? Or, do you have other ideas on how I could solve this problem?
thank you,
-Nathan Tallent.
More information about the Binutils
mailing list