Hi,

I've been trying to use -export-symbols-regex with a C++ library, but the
way this feature currently works means that you get the mangled versions of
the symbols.  This seems less than ideal for (at least) a couple of reasons:

* The mangled versions really are a cryptic implementation detail of the
  compiler.

* Different systems may use different name mangling schemes.  Libtool is
  meant to aid portability which argues for presenting the unmangled names
  to be matched.

What seems to be needed is a demangling step before the regexp is matched,
and a remangling step after (so the symbols match those in the library).

If GNU nm is being used, we can demangle with that - otherwise we need to
find a similar switch, or perhaps include a small utility.  But is
demangling always reversible?  Can we be sure that we'll get back to the
symbol we started with, or do we need to make a map of what the demangling
did?

Cheers,
Olly

Reply via email to