This is the mail archive of the 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]

libiberty packaging troubles

My application needs to demangle C++ strings. Now, it seems that more
recent libiberty versions have automatic demangling for both ABI
versions. We would like to take advantage of this so that a user can get
sensible results even with a self-installed gcc version with different
mangling to the system compiler, and have it all "just work".

Currently we are linking against an installed libiberty. This sucks
because :

1) the header files are incomplete (demangle stuff). Recently it was
mentioned there was no interest in fixing this, because linking against
installed libiberty is not approved of

2) all the limitations of the system's libiberty are present, including
crashes, and corrupted data (seen recently by a user). As I said it
would be good if this "just worked"

So the supposed solution is to include the latest libiberty source in
our source. However there also some problems with this :

1) We need libbfd as well, there is a risk associated with using a newer
libiberty in our source against an older system libbfd

2) the source is large, and would more than double the size of our
source releases

3) neither the gcc or binutils version of libiberty are
self-encapsulated. They rely on a number of headers outside of libiberty

4) I could not find an answer as to which package had the master source
of libiberty

For obvious maintenance reasons, I would like to avoid touching /any/
libiberty code. But this seems very painful to do, given 2) and 3). I
could spend time filtering out which headers are needed by libiberty
but this is liable to breakage on updates to the vendor import of

I can make the necessary object files directly and not have unused
sources in my CVS tree, but this is equally painful to do

Does anybody have suggestions ? Is there a self-contained libiberty
somewhere ?

My other option is to investigate Carlo Wood's demangler in libcwd,
and see if I can get both demanglers to work automatically (are there
ambiguous cases between the two ABIs ? Why doesn't gcc add a hint in
the binary which mangling scheme was used :/)

thanks for any suggestions

p.s. I only care about x86/Linux

I am a complete moron for forgetting about endianness. May I be
forever marked as such.

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