summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorJames Lee <james@codeconstruct.com.au>2026-06-04 14:03:00 +0800
committerNathan Chancellor <nathan@kernel.org>2026-06-05 20:48:58 -0700
commit29c52907334a8e50ba1ee5fbaa53407dec28d876 (patch)
treec8ccd764ed69a551b0cba875da377affd171d5b1 /rust/kernel/alloc/kvec/errors.rs
parentf58316a441b4626324993db585fa4b7b7c780fac (diff)
modpost: Add __llvm_covfun and __llvm_covmap to section_white_list
Modpost emits hundreds of warnings when using Clang to build for ARCH=um and CONFIG_GCOV=y. e.g.: vmlinux (__llvm_covfun): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. For example, when we use LLVM for a kunit user mode build with coverage: python3 tools/testing/kunit/kunit.py build --make_options LLVM=1 \ --kunitconfig=tools/testing/kunit/configs/default.config \ --kunitconfig=tools/testing/kunit/configs/coverage_uml.config The behaviour occurs when building the kernel for ARCH=um with code coverage enabled. The warnings come from modpost's check_sec_ref function, which ensures no sections reference others that will be discarded. covfun and covmap sections must reference __init and __exit sections to collect coverage data, triggering the modpost warning. To suppress these warnings, these section names have been added to modpost's whitelist. This is unlikely to suppress legitimate warnings as Clang will only insert these sections when building with coverage, and can be assumed to manage these references safely. Signed-off-by: James Lee <james@codeconstruct.com.au> Link: https://patch.msgid.link/20260604-dev-coverage-patch-v1-1-9f9368253cb4@codeconstruct.com.au Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions