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

edA-qa mort-ora-y eda-qa at disemia.com
Sun Oct 6 06:25:36 PDT 2013


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131006/c2874ace/attachment.sig>


More information about the llvm-dev mailing list