[snip]

> 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?

Reply via email to