[RFC PATCH v2 06/11] klp-build: Require CONFIG_DEBUG_INFO
From: Longjun Luo
Date: Wed Nov 04 2026 - 08:39:04 EST
Require the kernel's debug information configuration for DWARF-based
symbol correlation. Use the C and assembly flags supplied by Kbuild
instead of adding separate -g flags in klp-build.
Reduced and split DWARF are supported by the reader and saved-object
handling introduced earlier in this series.
Validated the available objtool tests with GCC 16.2.1 and Clang
22.1.8. No failures.
Suggested-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Assisted-by: LLM
Signed-off-by: Longjun Luo <luolongjuna@xxxxxxxxx>
---
scripts/livepatch/klp-build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build
index 95bea5b2057e..da55e1028fe3 100755
--- a/scripts/livepatch/klp-build
+++ b/scripts/livepatch/klp-build
@@ -266,6 +266,9 @@ validate_config() {
[[ -v CONFIG_KLP_BUILD ]] || \
die "CONFIG_KLP_BUILD not enabled"
+ [[ -v CONFIG_DEBUG_INFO ]] || \
+ die "CONFIG_DEBUG_INFO not enabled"
+
if [[ -v CONFIG_DEBUG_INFO_SPLIT ]]; then
command -v "$DWP" &>/dev/null ||
die "split DWARF requires llvm-dwp (or set DWP)"
--
2.55.0