Skip to content

Commit a3f3992

Browse files
scripts: Exclude Rust CUs with pahole
Version 1.24 of pahole has the capability to exclude compilation units (CUs) of specific languages. Rust, as of writing, is not currently supported by pahole and if it's used with a build that has BTF debugging enabled it results in malformed kernel and module binaries (see #735). So it's better for pahole to exclude Rust CUs until support for it arrives. Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
1 parent 459035a commit a3f3992

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ config RUST
19171917
depends on !MODVERSIONS
19181918
depends on !GCC_PLUGINS
19191919
depends on !RANDSTRUCT
1920-
depends on !DEBUG_INFO_BTF
1920+
depends on !DEBUG_INFO_BTF || PAHOLE_VERSION >= 124
19211921
select CONSTRUCTORS
19221922
help
19231923
Enables Rust support in the kernel.

scripts/pahole-flags.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ fi
1919
if [ "${pahole_ver}" -ge "122" ]; then
2020
extra_paholeopt="${extra_paholeopt} -j"
2121
fi
22+
if [ "${pahole_ver}" -ge "124" ]; then
23+
extra_paholeopt="${extra_paholeopt} --lang_exclude=rust"
24+
fi
2225

2326
echo ${extra_paholeopt}

0 commit comments

Comments
 (0)