[LLVMdev] Migration from JIT to MCJIT

Weiss, Eran Eran.Weiss at emc.com
Tue Apr 9 06:08:12 PDT 2013


Hi,

I'm migrating my code (running on mac) from using JIT to MCJIT. My code generates in memory, mostly using the llvm-c api, and then runs the generated code.
When I try to use MCJIT I encounter a problem with relocations of external symbols – functions compiled statically beforehand with gcc.

I get the following error:

Invalid relocation type!
UNREACHABLE executed at /Users/weisse4/dev/llvm/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp:89

While debugging, I see that the relocation type read in RuntimeDyldImpl::loadObject is 218103811, which seems corrupt to me.
Did someone encounter a similar error? Or can direct me to changes that I need to do while migrating from JIT to MCJIT?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130409/95253b9c/attachment.html>


More information about the llvm-dev mailing list