[LLVMdev] How to call native functions from bytecode run in JIT?

Jan Rehders cmdkeen at gmx.de
Mon Jun 11 08:23:30 PDT 2007


> Are you able make calls to well known external functions such as
> printf? As far as I known, this capability is well tested on x86 /
> Linux.

Calling printf works at least on OS X (I'm waiting for a reply  
whether this works on linux). If I call my native function it fails  
with PPCJITInfo.cpp:382: failed assertion `ResultPtr >= -(1 << 23) &&  
ResultPtr < (1 << 23) && "Relocation out of range!"'

> I am wondering if there is some name mangling issue?

Not that I'm aware of. It appears to find the function using module- 
 >getFunction("get5")

Is there really nobody here who knows how to properly register native  
functions of the application to the execution engine?




More information about the llvm-dev mailing list