<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 26, 2019, 14:24 Lang Hames via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>(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.</div></div></div></blockquote></div></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">You can add a breakpoint or printf to the symbol resolver to see which names it tries to resolve and add those manually.</div><div dir="auto"><br></div><div dir="auto">Jacob Lifshay</div></div>