[LLVMdev] call/link to host program function

edA-qa mort-ora-y eda-qa at disemia.com
Tue Nov 13 09:08:12 PST 2012

On 13/11/12 09:12, Duncan Sands wrote:
> if you add a declaration for your callback in the IR, and add some calls
> to it, the symbol should be automatically resolved by the JIT as far as I
> know (you may need to have built with libffi support).

Great! I guess this also explains why printf was working in my test
programs. I just assumed the JIT exposed libc automatically, but it
appears it links against the current symbol table.

I guess this also means the address space is actually shared. So if I
pass pointers of the functions into the JIT should it also work?

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: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121113/ff21d3a4/attachment.sig>

More information about the llvm-dev mailing list