[PATCH] D12625: [llgo] Force exporting __morestack from llgoi

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 01:46:00 PDT 2015


axw added a comment.

In http://reviews.llvm.org/D12625#251706, @pcc wrote:

> Can you explain why the stuff in `lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp` doesn't help here?


The problem is when ExceptionEngine is built as a shared library. In this case, libLLVMExecutionEngine.so (or libLLVM.so, as in my case) has a weak symbol reference to __morestack, rather than the main program having the weak symbol. That weak symbol reference is never resolved because neither llgoi nor libgo-llgo exports it.

Is there a better, more general solution? This feels a bit kludgey, but I'm not sure what else to do about it. Perhaps a mode in which ExecutionEngine can be compiled with a non-weak reference to __morestack?


http://reviews.llvm.org/D12625





More information about the llvm-commits mailing list