[RFC PATCH v2 06/11] klp-build: Require CONFIG_DEBUG_INFO

From
Longjun Luo <hidden>
Date
2026-11-04 13:32:49
Also in
lkml, llvm
Reply to
Longjun Luo, 2026-11-04
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@kernel.org>
Assisted-by: LLM
Signed-off-by: Longjun Luo <redacted>
---
 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
Thread (28 messages) 28 messages, 3 authors, last reply 2d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help