[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function

Chris Lattner sabre at nondot.org
Wed Sep 20 11:04:47 PDT 2006


On Tue, 19 Sep 2006, Andreas Eriksson wrote:
> When I run my program outside of gdb, the native function is more than 2^23
> words from the JIT code, which is too far for a PC relative jump:

> So how is this supposed to work? Is it wrong that the memory block for the JIT
> code is allocated too far off or should a non PC relative jump be generated
> instead?

A simple solution/workaround:  instead of using GetAddressOfSymbol + 
addGlobalMapping directly, just name the external LLVM Function 
"nativeFunction" instead of "native".  The JIT will automatically find 
'nativeFunction' in your app and DTRT.

I will try to fix addGlobalToMapping.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list