libbpf: Add elf_resolve_syms_offsets function
authorJiri Olsa <jolsa@kernel.org>
Wed, 9 Aug 2023 08:34:23 +0000 (10:34 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Aug 2023 22:51:26 +0000 (15:51 -0700)
commit7ace84c6892971766b7c252b3998d5662679e472
treee5cb1aebd711604dc4719b5ea485efc5004b6491
parent3774705db1718a671a4ed2ac5066fea839b1d7d1
libbpf: Add elf_resolve_syms_offsets function

Adding elf_resolve_syms_offsets function that looks up
offsets for symbols specified in syms array argument.

Offsets are returned in allocated array with the 'cnt' size,
that needs to be released by the caller.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230809083440.3209381-12-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/elf.c
tools/lib/bpf/libbpf_internal.h