[llvm-dev] LLVM C API OrcJIT

Jacob Lifshay via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 27 10:02:08 PST 2019


On Tue, Feb 26, 2019, 14:24 Lang Hames via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> (1) You will want to remove the call to LLVMOrcGetSymbolAddress from your
> sym_resolver function: In the ORC C API resolvers are only used to resolve
> external symbols (i.e. ones not defined in the JIT'd code). So in your
> case, given that you *only* searched the JIT, I think you can define this
> function to just return zero, meaning JIT'd code can't call external
> functions.
>
In my experience with LLVM 4, LLVM can generate calls to external functions
such as memcpy, so, assuming LLVM doesn't resolve those functions by
itself, you still need to resolve them in the symbol resolver function.

You can add a breakpoint or printf to the symbol resolver to see which
names it tries to resolve and add those manually.

Jacob Lifshay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190227/a5dccfbb/attachment.html>


More information about the llvm-dev mailing list