Re: [PATCH dwarves] pahole: distilled_base btf_feature should be reported for libbpf > 1.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 25, 2024 at 06:15:53PM +0100, Alan Maguire wrote:
> Alexei ran into issues [1] generating distilled base BTF with pahole built
> against an older < 1.5 libbpf.  For older libbpf, we cannot support
> distilled base BTF (since the library API btf__distill_base() is not
> present) so we should not report it as a feature in that case.
> 
> [1] https://lore.kernel.org/bpf/CAADnVQKFjK8BnZ-rYzXKv-Zdw=HBJRoJ7jo5PN+0P6+qpJOxNg@xxxxxxxxxxxxxx/
> 
> Reported-by: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>
> Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>

Thanks, applied.

- Arnaldo

> ---
>  pahole.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/pahole.c b/pahole.c
> index 0b91a7e..55d04cf 100644
> --- a/pahole.c
> +++ b/pahole.c
> @@ -1206,7 +1206,9 @@ struct btf_feature {
>  	BTF_DEFAULT_FEATURE(consistent_func, skip_encoding_btf_inconsistent_proto, false),
>  	BTF_DEFAULT_FEATURE(decl_tag_kfuncs, btf_decl_tag_kfuncs, false),
>  	BTF_NON_DEFAULT_FEATURE(reproducible_build, reproducible_build, false),
> +#if LIBBPF_MAJOR_VERSION >= 1 && LIBBPF_MINOR_VERSION >= 5
>  	BTF_NON_DEFAULT_FEATURE(distilled_base, btf_gen_distilled_base, false),
> +#endif
>  	BTF_NON_DEFAULT_FEATURE(global_var, encode_btf_global_vars, false),
>  };
>  
> -- 
> 2.43.5




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux