build: add option KERNEL_DEBUG_INFO_BTF
authorTony Ambardar <itugrok@yahoo.com>
Sun, 26 Jul 2020 14:51:34 +0000 (07:51 -0700)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 28 Mar 2022 11:58:33 +0000 (14:58 +0300)
commitf28e2d2245297d4327f1614f4a2785251de30519
tree5eb4d711e978409ac211dad71339d60e5f0912d6
parentf70b7c33437d2b1237b3b5cc4baafc53bfaa6aa3
build: add option KERNEL_DEBUG_INFO_BTF

Generate BTF (BPF Type Format) information from DWARF debug info. This is
embedded in the kernel and exported via sysfs as /sys/kernel/btf/vmlinux.
BTF data enhances kernel portability and introspection for BPF programs.

Selecting this also enables the dwarves host package which provides the
pahole tool used for BTF encoding.

Test using: "bpftool btf dump file /sys/kernel/btf/vmlinux format c"

This needs to depend on KERNEL_DEBUG_INFO_REDUCED not being set,
otherwise we can enable both KERNEL_DEBUG_INFO_BTF and
KERNEL_DEBUG_INFO_REDUCED, which will result in undefined behaviour.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
[split DEBUG_INFO_REDUCED into separate commit, add dependency]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
config/Config-kernel.in