kangjing820516 at sina.com
2008-Oct-18 11:31 UTC
[LLVMdev] 回复:Re: [LLVMdev] [Need your help]
Hi Eli, Thanks for your rapid response! Now I have another question. How to get LLVM bc files successfully by compiling test.c and static libraries ? Thanks a lot! ----- 原始邮件 ----- 发件人:Eli Friedman <eli.friedman at gmail.com> 收件人:LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> 主题:Re: [LLVMdev] [Need your help] 日期:2008-10-18 01:05:03 On Fri, Oct 17, 2008 at 9:46 AM, <kangjing820516 at sina.com> wrote:> I tried to compile a C programme test.c with llvm-gcc by task: > [root at localhost mylib]# llvm-gcc -emit-llvm test.c -Llibmylib.a -c -o > test.bcThe -L flag doesn't do anything here.> [root at localhost mylib]# lli test.bc > > after running the command "lli test.bc",print the error info as follows: > ERROR: Program used external function 'gt' which could not be resolved! > lli[0x85c245f] > /lib/libc.so.6(abort+0x101)[0x6988b1] > lli(_ZN4llvm3JIT25getPointerToNamedFunctionERKSs+0xd2)[0x8267952] > AbortedOf course; where do you expect it to find the function? lli only supports loading LLVM bc files and dynamic libraries. -Eli _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev ------------------------------------------------------------------- 新浪空间——与朋友开心分享网络新生活!(http://space.sina.com.cn/ ) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081018/05d320a3/attachment.html>
Eli Friedman
2008-Oct-18 17:13 UTC
[LLVMdev] Re: [LLVMdev] 回复:Re: [LLVMdev] [Need your help]
2008/10/18 <kangjing820516 at sina.com>:> Hi Eli, > > Thanks for your rapid response! > > Now I have another question. > > How to get LLVM bc files successfully by compiling test.c and static > libraries ? > > Thanks a lot!You can use llvm-ld to combine multiple bc files into a single bc file. It's not possible to put native code into a bc file. -Eli