[llvm-dev] Is it possible to generate a whole kernel bitcode for Linux using clang?

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 10 02:54:38 PDT 2019

Hi Jason,

On Thu, 10 Oct 2019 at 10:39, Jason Thomas via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Frequently, the resulting bitcode was not functional due to different parts being missing. Did that situation change at all? Can we generate a function, monolithic, self-contained bitcode using something like libLTO? Any help would be appreciated.

You can get the linker to emit the last bitcode that exists (e.g. via
--plugin-opt save-temps or emit-llvm I think), but it still won't be
self contained for something like a kernel. There's no representation
in IR for objects that come from .s files or the linker script for a



More information about the llvm-dev mailing list