Andrii Nakryiko wrote: > 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@xxxxxx> > --- > tools/lib/bpf/libbpf.c | 82 +++++++++++++++++++++++++++++++++++++----- > 1 file changed, 74 insertions(+), 8 deletions(-) > Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>