Li Shengmei
2010-Jan-05 04:53 UTC
[LLVMdev] Clang "warning: cannot find entry symbol mit-llvm-bc"
Hi, I am new to Clang. There is a warning when I use clang $llvmc -clang test.c "./bin/ld: warning: cannot find entry symbol mit-llvm-bc; defaulting to 00000000004003c0 llc: bitcode didn't read correctly." When I use lli to execute the test.bc as $lli test. bc The error message is "lli: error loading program 'test.bc': Bitcode stream should be a multiple of 4 bytes in length" Anyone give help on it? Thanks in advance. Shengmei -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100105/1cd46ff9/attachment.html>
Török Edwin
2010-Jan-05 20:52 UTC
[LLVMdev] Clang "warning: cannot find entry symbol mit-llvm-bc"
On 2010-01-05 06:53, Li Shengmei wrote:> > Hi, > > I am new to Clang. There is a warning when I use clang > > $llvmc -clang test.c > > “…/bin/ld: warning: cannot find entry symbol mit-llvm-bc; defaulting > to 00000000004003c0 >This looks like something has gone wrong during command-line parsing, and it has interpreted -emit-llvm-bc as "entrypoint is mit-llvm-bc" If you just want to create a bitcode from clang simplest way is to run: clang -emit-llvm-bc test.c -o test.bc test.c -c Best regards, --Edwin