OSDN Git Service

libbpf: Refactor CO-RE relocs to not assume a single BTF object
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 3 Dec 2020 20:46:24 +0000 (12:46 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Dec 2020 01:38:20 +0000 (17:38 -0800)
commit0f7515ca7cddadabe04e28e20a257b1bbb6cb98a
tree2f7f002a20defc7831e2987feefe0f9016088e85
parenta19f93cfafdf85851c69bc9f677aa4f40c53610f
libbpf: Refactor CO-RE relocs to not assume a single BTF object

Refactor CO-RE relocation candidate search to not expect a single BTF, rather
return all candidate types with their corresponding BTF objects. This will
allow to extend CO-RE relocations to accommodate kernel module BTFs.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20201203204634.1325171-5-andrii@kernel.org
tools/lib/bpf/libbpf.c