There exists the following error when building bpf selftest:
$ cd tools/testing/selftests/bpf/
$ make
...
libbpf: failed to find '.BTF' ELF section in /home/fedora/bpf.git/vmlinux
Error: failed to load BTF from /home/fedora/bpf.git/vmlinux: No data available
Enable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT and CONFIG_DEBUG_INFO_BTF
to avoid the building errors.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
arch/loongarch/configs/loongson3_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
index 4289e3abf8c7..d9160f025da0 100644
--- a/arch/loongarch/configs/loongson3_defconfig
+++ b/arch/loongarch/configs/loongson3_defconfig
@@ -1002,6 +1002,8 @@ CONFIG_DMA_CMA=y
CONFIG_DMA_NUMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
+CONFIG_DEBUG_INFO_BTF=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
--
2.42.0