Thread (41 messages) 41 messages, 7 authors, 4d ago

Re: [PATCH bpf-next v4 12/12] kbuild, bpf: allow building the vmlinux BTF as a module

flat view

From: Alan Maguire <hidden>
Date: 2026-10-02 09:48:02
Also in: bpf, linux-doc, linux-input, linux-kbuild, linux-kselftest, linux-perf-users, linux-trace-kernel, lkml, rust-for-linux, sched-ext

[snip]
quoted hunk ↗ jump to hunk
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 46e80970f723..c884308d1e85 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -76,6 +76,10 @@ This package provides debug information for the kernel image and modules from th
 %if %{with_keep_section}
 %global _find_debuginfo_opts -r --keep-section .BTF --keep-section .BTF.base
 %else
+%if %{with_btf_vmlinux_module}
+# With CONFIG_DEBUG_INFO_BTF=m, btf_vmlinux.ko carries the vmlinux BTF in .BTF
+%{error:find-debuginfo cannot keep .BTF, which btf_vmlinux.ko needs; build without debuginfo (--without debuginfo)}
+%endif
 %global _find_debuginfo_opts -r
 %endif
I think we need a --keep-section for .BTF.link above too?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help