[LLVMdev] Hooking the global symbol resolver

Jonathan S. Shapiro shap at eros-os.com
Thu Mar 27 13:30:54 PDT 2008

On Thu, 2008-03-27 at 21:22 +0100, Óscar Fuentes wrote:
> I'm all for hooks and delegation, but the problem here is that your
> proposal is not general enough and is hard to generalize it. It does not
> work for my project, for instance, although I face almost the same
> requirements than you wrt dynamic generation. The symbol name is enough
> for you, but not for me, and there is no way to teach LLVM about what
> info I need.

Is this because you have a more complicated scenario, or is it because
your name mangling scheme is not sufficiently well designed?

The evolution of mangling schemes in C++ initially ignored
reversibility. This was a *huge* mistake, and it took years to correct
it. The original problem was linkers that could not handle very long
identifiers. Over time that issue was fixed, and eventually the world
converged on an invertible scheme. Modern compilers almost universally
use an invertible scheme today.

I know nothing at all about your language (though I would like to
correct that deficiency), but I am very confident that if an invertible
mangling scheme is possible for you in principle, the time spent to
develop one early will be repaid many times over later.


More information about the llvm-dev mailing list