mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-01 22:29:06 +08:00
libbpf: Move elf_find_func_offset* functions to elf object
Adding new elf object that will contain elf related functions. There's no functional change. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20230809083440.3209381-9-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
a1c2e05c4f
commit
0cd5b05f53
@@ -15,6 +15,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <libelf.h>
|
||||
#include "relo_core.h"
|
||||
|
||||
/* make sure libbpf doesn't use kernel-only integer typedefs */
|
||||
@@ -577,4 +578,7 @@ static inline bool is_pow_of_2(size_t x)
|
||||
#define PROG_LOAD_ATTEMPTS 5
|
||||
int sys_bpf_prog_load(union bpf_attr *attr, unsigned int size, int attempts);
|
||||
|
||||
long elf_find_func_offset(Elf *elf, const char *binary_path, const char *name);
|
||||
long elf_find_func_offset_from_file(const char *binary_path, const char *name);
|
||||
|
||||
#endif /* __LIBBPF_LIBBPF_INTERNAL_H */
|
||||
|
||||
Reference in New Issue
Block a user