Commit ae288e4
bpf: fix "unresolved symbol" build error with resolve_btfids
Michal reported a build failure likes below:
BTFIDS vmlinux
FAILED unresolved symbol tcp_timewait_sock
make[1]: *** [/.../linux-5.9-rc7/Makefile:1176: vmlinux] Error 255
This error can be triggered when config has CONFIG_NET enabled
but CONFIG_INET disabled. In this case, there is no user of
structs inet_timewait_sock and tcp_timewait_sock and hence vmlinux BTF
types are not generated for these two structures.
To fix the problem, let us force BTF generation for these two
structures with BTF_TYPE_EMIT.
Fixes: fce557b ("bpf: Make btf_sock_ids global")
Reported-by: Michal Kubecek <[email protected]>
Signed-off-by: Yonghong Song <[email protected]>1 parent afe24c4 commit ae288e4
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9558 | 9558 | | |
9559 | 9559 | | |
9560 | 9560 | | |
| 9561 | + | |
| 9562 | + | |
| 9563 | + | |
| 9564 | + | |
| 9565 | + | |
| 9566 | + | |
9561 | 9567 | | |
9562 | 9568 | | |
9563 | 9569 | | |
| |||
0 commit comments