OSDN Git Service

libbpf: Implement generalized .BTF.ext func/line info adjustment
authorAndrii Nakryiko <andriin@fb.com>
Thu, 3 Sep 2020 20:35:33 +0000 (13:35 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Sep 2020 00:14:40 +0000 (17:14 -0700)
commit8505e8709b5eedb7c662354e8436a2a164181109
treeafe567cf93b1e30ed0c002b6918af142f4dee5df
parentc3c556966de7a0d5f8c908f407c673070fcdbf2b
libbpf: Implement generalized .BTF.ext func/line info adjustment

Complete multi-prog sections and multi sub-prog support in libbpf by properly
adjusting .BTF.ext's line and function information. Mark exposed
btf_ext__reloc_func_info() and btf_ext__reloc_func_info() APIs as deprecated.
These APIs have simplistic assumption that all sub-programs are going to be
appended to all main BPF programs, which doesn't hold in real life. It's
unlikely there are any users of this API, as it's very libbpf
internals-specific.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200903203542.15944-6-andriin@fb.com
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf_common.h