Closed Luluno01 closed 2 years ago
Hello,
It's been a while since we used llvm-linux (now we abandoned GCC and switched to the new LLVM/Clang version to build the kernel) as we also faced many technical issues similar to yours.
I'm unsure when we can release the newer version (which does not have such a hacky issue), but we will surely released the code once ready.
In the meantime, I suggest you may try with the new LLVM/Clang to build the kernel and static analysis.
Thanks and good to hear that this problem will be solved! So does it mean as long as long I can manage to get the built-in.bc
files, it does not matter how I get them?
Right. The current problem is that the LLVM/Clang version that Razzer is built on cannot build the Linux kernel, so we went "a bit complex" llvm-linux. My guess is you will be fine as long as you get build-in.bc
.
Okay, I will give it a try. Thanks!
Hi, I am following the instructions to build bitcode files. However, after running
./build-kernel.sh --config configs/static_analysis_v4.16.mk
, forbuilt-in.*
, onlybuilt-in.o
files were built but nobuilt-in.bc
. For other files, e.g.,kernel/pid.c
, the corresponding.o
files and.bc
files were built.The
./build-kernel.sh
scripts also failed because of a bunchundefined reference to xxx
errors when executing the commandtools/llvmlinux/arch/all/bin/llvm-link-bc.sh -m elf_x86_64 -z max-page-size=0x200000 --build-id -o .tmp_vmlinux1 -T ./arch/x86/kernel/vmlinux.lds --whole-archive built-in.o --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group
, according totmp/log
. As pointed out here, I can ignore the link error because it was expected, but I cannot find anybuilt-in.bc
files built for subsequent analysis.Any ideas? Thanks!