[LLVMdev] how to runtime link to shared library symbols in the JIT?

Yaron Keren yaron.keren at gmail.com
Sun Oct 6 08:02:03 PDT 2013


On Windows DLLs loaded
with llvm::sys::DynamicLibrary::LoadLibraryPermanently() are available to
the JIT and MCJIT. I guess this should work with other OS.

Yaron



2013/10/6 edA-qa mort-ora-y <eda-qa at disemia.com>

> I would like to load shared libraries at runtime for use in some JIT'd
> code. I can't find much about how the JIT resolves symbols, so can
> somebody answer a few questions for me?
>
> 1. Will the symbols from a dlopen'd library with RTLD_GLOBAL be
> available? In this case I can manually dlopen the libraries prior to the
> JIT run.
>
> 2. Can I derive from ExecutionEngine and override the
> getPointerToNamedFunction method? If so, does this just return the C/ABI
> pointer to the function? What is the equivalent for data variables?
>
> 3. Is the same basic model available on Windows using DLLs? I really
> don't have any experience there yet.
>
>
>
> --
> edA-qa mort-ora-y
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Sign: Please digitally sign your emails.
> Encrypt: I'm also happy to receive encrypted mail.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131006/e514a7c5/attachment.html>


More information about the llvm-dev mailing list