tools/resolve_btfids: Emit warnings and patch zero id for missing symbols
authorHengqi Chen <hengqi.chen@gmail.com>
Tue, 27 Jul 2021 13:25:31 +0000 (21:25 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 29 Jul 2021 21:37:23 +0000 (14:37 -0700)
commit5aad03685185b5133a28e1ee1d4e98d3fd3642a3
tree4e0c50e20b2394264c5b3031607c6bfd3bd9974d
parent33b57e0cc78eb82f2921eb4c6d1c8fcaa733823b
tools/resolve_btfids: Emit warnings and patch zero id for missing symbols

Kernel functions referenced by .BTF_ids may be changed from global to static
and get inlined or get renamed/removed, and thus disappears from BTF.
This causes kernel build failure when resolve_btfids do id patch for symbols
in .BTF_ids in vmlinux. Update resolve_btfids to emit warning messages and
patch zero id for missing symbols instead of aborting kernel build process.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210727132532.2473636-2-hengqi.chen@gmail.com
tools/bpf/resolve_btfids/main.c