]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support kernel module ksym externs
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Jan 2021 07:55:19 +0000 (23:55 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 13 Jan 2021 01:24:30 +0000 (17:24 -0800)
commitd38ed3bcdf46e3ee7e739cb5ea89fe1f3f37c48e
tree4561089bac28f2ff31247f077824eccf570cfbe2
parent0d66b39187e343bede44d484357c47970c3ab609
libbpf: Support kernel module ksym externs

Add support for searching for ksym externs not just in vmlinux BTF, but across
all module BTFs, similarly to how it's done for CO-RE relocations. Kernels
that expose module BTFs through sysfs are assumed to support new ldimm64
instruction extension with BTF FD provided in insn[1].imm field, so no extra
feature detection is performed.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Hao Luo <haoluo@google.com>
Link: https://lore.kernel.org/bpf/20210112075520.4103414-7-andrii@kernel.org
tools/lib/bpf/libbpf.c