]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: Disallow BTF generation with Rust + LTO
authorMatthew Maurer <mmaurer@google.com>
Wed, 8 Jan 2025 23:35:08 +0000 (23:35 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 11 Mar 2025 19:11:09 +0000 (20:11 +0100)
commit5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619
treeafa7e81e383bd0dc882b7f409d1d0c2b381ca716
parent6fbafe1cbed10e53b3cf236a8a1987425206dd8e
rust: Disallow BTF generation with Rust + LTO

The kernel cannot currently self-parse BTF containing Rust debug
information. pahole uses the language of the CU to determine whether to
filter out debug information when generating the BTF. When LTO is
enabled, Rust code can cross CU boundaries, resulting in Rust debug
information in CUs labeled as C. This results in a system which cannot
parse its own BTF.

Signed-off-by: Matthew Maurer <mmaurer@google.com>
Cc: stable@vger.kernel.org
Fixes: c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole")
Link: https://lore.kernel.org/r/20250108-rust-btf-lto-incompat-v1-1-60243ff6d820@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
init/Kconfig