diff options
author | Jiri Olsa <jolsa@kernel.org> | 2023-08-09 11:34:23 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-08-22 01:51:26 +0300 |
commit | 7ace84c6892971766b7c252b3998d5662679e472 (patch) | |
tree | e5cb1aebd711604dc4719b5ea485efc5004b6491 /tools/lib/bpf/libbpf_internal.h | |
parent | 3774705db1718a671a4ed2ac5066fea839b1d7d1 (diff) | |
download | linux-7ace84c6892971766b7c252b3998d5662679e472.tar.xz |
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>
Diffstat (limited to 'tools/lib/bpf/libbpf_internal.h')
-rw-r--r-- | tools/lib/bpf/libbpf_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h index 0bbcd8e6fdc5..92851c5f912d 100644 --- a/tools/lib/bpf/libbpf_internal.h +++ b/tools/lib/bpf/libbpf_internal.h @@ -589,4 +589,6 @@ struct elf_fd { int elf_open(const char *binary_path, struct elf_fd *elf_fd); void elf_close(struct elf_fd *elf_fd); +int elf_resolve_syms_offsets(const char *binary_path, int cnt, + const char **syms, unsigned long **poffsets); #endif /* __LIBBPF_LIBBPF_INTERNAL_H */ |