[klee-dev] whole-program-llvm

Zhiyi Zhang xianlingzibiying at gmail.com
Thu Mar 19 07:08:23 GMT 2015


Hi all,

I am using KLEE with LLVM-3.4 and want to redo the experiments of
Coreutils. Since LLVM-3.4 uses clang-3.4 but not llvm-gcc, I prefer
whole-program-llvm to compile coreutils programs. The compile steps are as
following:










*export PATH=/home/loveling10/klee/build/Release+Asserts/bin:$PATHexport
C_INCLUDE_PATH=/usr/include/i386-linux-gnuexport
CPLUS_INCLUDE_PATH=/usr/include/i386-linux-gnuexport
LD_LIBRARY_PATH=/usr/lib/gcc/i686-linux-gnu/4.8.3
(I do not know why it is i686, but there is no i386 in /urs/lib/gcc
folder)export LIBRARY_PATH=/usr/lib/i386-linux-gnuexport
LLVM_COMPILER=clangexport
LLVM_COMPILER_PATH=/usr/lib/llvm-3.4/build/Debug+Asserts/bin*
*mkdir obj-llvm*
*cd obj-llvm*
* ../configure --disable-nls CFLAGS="-g"*
*CC=CC=wllvm CXX=wllvm++*
*make*

And .o files have been generated.

However, when I use extract-bc to generate .bc files,

*$/home/loveling10/whole-program-llvm/extract-bc
/home/loveling10/klee/examples/coreutils/coreutils/obj-llvm/src/base64.o*

it reports the error that

*ERROR:File "/home/loveling10/klee/examples/coreutils/coreutils/obj-llvm/src/base64.o"
of type ELF_OBJECT cannot be used.*

I have no idea how to solve this problem. Whether there are some errors in
my steps?

Thank you very much.
Zhiyi Zhang
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list