bpf: Generate BTF_KIND_FLOAT when linking vmlinux
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 19 Oct 2022 08:56:00 +0000 (10:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2022 10:55:17 +0000 (12:55 +0200)
commitbbaea0f1cd33d702d053d5bdaf6d6dec3932894c
tree4791aa03e06d73d8b4b389ce76575aac412a363c
parenta10a57a224f32035b58ef68b069f5b7491dd13e2
bpf: Generate BTF_KIND_FLOAT when linking vmlinux

commit db16c1fe92d7ba7d39061faef897842baee2c887  upstream.

[backported for dependency only extra_paholeopt variable setup and
usage, we don't want floats generated in 5.10]

pahole v1.21 supports the --btf_gen_floats flag, which makes it
generate the information about the floating-point types [1].

Adjust link-vmlinux.sh to pass this flag to pahole in case it's
supported, which is determined using a simple version check.

[1] https://lore.kernel.org/dwarves/YHRiXNX1JUF2Az0A@kernel.org/

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210413190043.21918-1-iii@linux.ibm.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/link-vmlinux.sh