]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Resolve invalid weak kfunc calls with imm = 0, off = 0
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sat, 2 Oct 2021 01:17:55 +0000 (06:47 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 6 Oct 2021 00:07:42 +0000 (17:07 -0700)
commit6d8efb8ed49c18ebf64e45b76380a2cdbf806570
tree301439d7ed5876fc6efc96bbe4dccf1cb39a7eff
parent970911ffc0e09de9c02e20a0acfb441b27aaa73f
libbpf: Resolve invalid weak kfunc calls with imm = 0, off = 0

Preserve these calls as it allows verifier to succeed in loading the
program if they are determined to be unreachable after dead code
elimination during program load. If not, the verifier will fail at
runtime. This is done for ext->is_weak symbols similar to the case for
variable ksyms.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211002011757.311265-8-memxor@gmail.com
tools/lib/bpf/libbpf.c