File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1913,7 +1913,7 @@ config RUST
19131913 depends on !MODVERSIONS
19141914 depends on !GCC_PLUGINS
19151915 depends on !RANDSTRUCT
1916- depends on !DEBUG_INFO_BTF
1916+ depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
19171917 select CONSTRUCTORS
19181918 help
19191919 Enables Rust support in the kernel.
Original file line number Diff line number Diff line change @@ -364,6 +364,15 @@ config PAHOLE_HAS_BTF_TAG
364364 btf_decl_tag) or not. Currently only clang compiler implements
365365 these attributes, so make the config depend on CC_IS_CLANG.
366366
367+ config PAHOLE_HAS_LANG_EXCLUDE
368+ def_bool PAHOLE_VERSION >= 124
369+ help
370+ Support for the --lang_exclude flag which makes pahole exclude
371+ compilation units from the supplied language. Used in Kbuild to
372+ omit Rust CUs which are not supported in version 1.24 of pahole,
373+ otherwise it would emit malformed kernel and module binaries when
374+ using DEBUG_INFO_BTF_MODULES.
375+
367376config DEBUG_INFO_BTF_MODULES
368377 def_bool y
369378 depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
Original file line number Diff line number Diff line change 1919if [ " ${pahole_ver} " -ge " 122" ]; then
2020 extra_paholeopt=" ${extra_paholeopt} -j"
2121fi
22+ if [ " ${pahole_ver} " -ge " 124" ]; then
23+ # see PAHOLE_HAS_LANG_EXCLUDE
24+ extra_paholeopt=" ${extra_paholeopt} --lang_exclude=rust"
25+ fi
2226
2327echo ${extra_paholeopt}
You can’t perform that action at this time.
0 commit comments