summaryrefslogtreecommitdiff
path: root/tools/lib/find_bit.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-09-03 13:35:31 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-09-03 17:14:39 -0700
commitdb2b8b06423c7eb4abcb4310b7234f00b30d7730 (patch)
tree659d1f49c91fea72fafc15d6baf8c0ca0a803da0 /tools/lib/find_bit.c
parentc112239272c6bacf7fcd0a0dc71999ad8eb1c55c (diff)
libbpf: Support CO-RE relocations for multi-prog sections
Fix up CO-RE relocation code to handle relocations against ELF sections containing multiple BPF programs. This requires lookup of a BPF program by its section name and instruction index it contains. While it could have been done as a simple loop, it could run into performance issues pretty quickly, as number of CO-RE relocations can be quite large in real-world applications, and each CO-RE relocation incurs BPF program look up now. So instead of simple loop, implement a binary search by section name + insn offset. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20200903203542.15944-4-andriin@fb.com
Diffstat (limited to 'tools/lib/find_bit.c')
0 files changed, 0 insertions, 0 deletions