libbpf: Skip BTF fixup if object file has no BTF
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 19 Mar 2021 20:59:08 +0000 (13:59 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Mar 2021 01:58:25 +0000 (18:58 -0700)
commit78b226d48106fc91628f941c66545f05273269df
tree52e4f693d2c4941ce8d004b8b92c063b295eb64a
parent9ef05281e5d01dffdf75a4ae5c1aee7cbd7aaa73
libbpf: Skip BTF fixup if object file has no BTF

Skip BTF fixup step when input object file is missing BTF altogether.

Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support")
Reported-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/bpf/20210319205909.1748642-3-andrii@kernel.org
tools/lib/bpf/linker.c