lucefe
2013-Nov-01 10:28 UTC
[LLVMdev] How to prevent optimizations and preserve program variables during link?
Hi, I am using klee-gcc to compile 'findutils', but I don't know why the variables are all replaced with temp variables(such as %10) and instructions are reordered for optimizations, how can I generate the bytecode and reserve the program variables. I used the next commands without any optimization options: 1. $ ../configure --disable-nls CFLAGS="-g" 2. $ make CC=/home/guest/installed/klee/scripts/klee-gcc *Moreover, I found the bytecode before linking had program variables, but the generated target object had non. why?* ** *For during the 'make' step, I encountered an error: * /home/guest/installed/klee/scripts/klee-gcc -Wdeclaration-after-statement -Wall -g -o find ftsfind.o ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a -lrt -lm -lm /usr/bin/ld.bfd.real: cannot find crt1.o: No such file or directory /usr/bin/ld.bfd.real: cannot find crti.o: No such file or directory ftsfind.o: file not recognized: File format not recognized collect2: ld returned 1 exit status *so I use the next command by hand instead:* llvm-ld -o find ftsfind.o ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a -L /usr/lib32/ -lrt -lm -lm *when '-disable-opt' was added, the same output was generated. * llvm-ld -disable-opt -o find ftsfind.o ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a -L /usr/lib32/ -lrt -lm -lm *Does some error in my llvm-ld command? And how can I prevent optimizations and preserve program variables. * -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131101/fc3455c5/attachment.html>