libbpf: Do not resolve size on duplicate FUNCs
authorEric Long <i@hack3r.moe>
Wed, 2 Oct 2024 06:25:06 +0000 (14:25 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 8 Oct 2024 03:28:53 +0000 (20:28 -0700)
commit4b146e95da87bf0fe64502aaafebeb622dfff653
tree5f74161e77ebbea223695504e7a62bdbab29b194
parentc50fc1cbfd71dcb1d70fd593b2af7c92af465921
libbpf: Do not resolve size on duplicate FUNCs

FUNCs do not have sizes, thus currently btf__resolve_size will fail
with -EINVAL. Add conditions so that we only update size when the BTF
object is not function or function prototype.

Signed-off-by: Eric Long <i@hack3r.moe>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241002-libbpf-dup-extern-funcs-v4-1-560eb460ff90@hack3r.moe
tools/lib/bpf/linker.c