[LLVMdev] llvm-clang jit module running into unresolved functions
Duncan Sands
baldrick at free.fr
Wed Dec 19 07:54:57 PST 2012
Hi Amit,
On 18/12/12 20:18, Amit Prakash wrote:
> We are trying to adapt the clang-llvm interpreter code here
> <http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/> to
> run some c++ code that uses stl vector and c++ string among other things. This
> resulted in a number of unresolved symbols, and after eliminating a bunch of
> them, we are still stuck with __Unwind_resume
__Unwind_Resume is defined in libgcc and for doing exception handling. If your
interpreter is statically linked with libgcc and doesn't use exception handling
then maybe this symbol was discarded, which would explain why the JIT'd code
can't find it. In general if the JIT'd code is using some library then either
the program doing the JITing needs to have been linked with that library, or it
needs to dynamically load the library on behalf of the JIT'd code.
Ciao, Duncan.
and __assert_fail
>
> I would really appreciate any help on resolving this.
>
> Note: we were having problem with includes in the code that needed to be jitted
> so we ran clang++ to preprocess it and the output of that is a single c++ file
> with no dependency on local includes. Not sure if that has introduced some problems.
>
> Note2: This is on Ubuntu 12.01 and we tried compiling clang interpreter with
> both clang+llvm 3.1 and with gcc 4.6.3
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list