Nvidia jetson 35.1 Linux 5.10.104 - build will fail if CONFIG_DEBUG_INFO_BTF=y

I can build the kernel v5.10.104 which came along with jetson 35.1 development kit with the tegra default kernel config. However, if I customized the default config by adding CONFIG_DEBUG_INFO_BTF=y, the build would end up this error :

LD .tmp_vmlinux.kallsyms1
KSYMS .tmp_vmlinux.kallsyms1.S
AS .tmp_vmlinux.kallsyms1.S
LD .tmp_vmlinux.kallsyms2
KSYMS .tmp_vmlinux.kallsyms2.S
AS .tmp_vmlinux.kallsyms2.S
LD vmlinux
BTFIDS vmlinux
FAILED unresolved symbol netlink_sock

I did some initial analysis. if I enabled this same config for a upstream v5.10.104, the build can complete successfully. Further more, if I removed all the Nvidia patches from the v5.10.104 kernel which is delivered with Jetson 35.1, then the build could succeed as well.

So I believe this error is caused by some of these Nvidia patches which patched the kernel v5.10.104.

Hope Nvidia will investigate and fix this problem.

Thanks for reporting it. We will try to reproduce the issue and do investigation.

And could you share the purpose of enabling CONFIG_DEBUG_INFO_BTF? We don’t have experience in enabling the config. Would be great if you can share more information.

Thanks for responding to this issue.
Basically BTF is bpf type format. After the kernel or kernel modules are built, a couple new sections named .BTF .BTF_ids will be created in each elf file. You can use objdump -h | grep BTF to see that and you can use objdump -s -j .BTF to see the contents. The reason that we need BTF is because the size of the trace type info is much smaller than the previous dwarf format.

Please modify


to add this line:


+ BTF_ID(struct, netlink_sock)
#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS)
BTF_ID(struct, netlink_sock)

1 Like

Hello Dane,

The code change you proposed fixed the problem. Thank you so much!


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.