This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch question for binutils files include/demangle.h and libiberty/cplus-dem.c


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]