JIT on ARM

Hi.
I am trying to run LLVM with JIT on ARM processor (Android phone).
Currently I have problems using external functions. Any call to external function crashes and gives me signal 11 (SIGSEGV) at some random address.

I'm trying to run following C code:

This sounds like http://llvm.org/bugs/show_bug.cgi?id=5201. The
summary of that bug talks about x86, but it applies to arm too, and
with a much smaller offset limit. I didn't remember it happening with
external functions, but there could be cases where it does. To check,
can you run your program in a debugger and look at the address of
my_add1 and the address it actually calls (and crashes on)? If it's
this bug, the low bits will be right, and the high bits will be the
same as the caller.