- build kernel using clang into binary successfully
- golang
- The related kernel module are enabled in Linux kernel configuration
go run path/of/v5.12/KernelBitcode.go --help
- Build Kernel with clang
make LLVM=1 -j16
- Generate script to build kernel into LLVM Bitcode
go run path/of/v5.12/KernelBitcode.go
- Get LLVM Bitcode
bash build.sh
built-in.bc
is in each directory.
All external modules are in the end of build.sh.
Now you can perform analysis on those LLVM bitcode files.