aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.c
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2023-08-09 08:34:24 +0000
committerAlexei Starovoitov <[email protected]>2023-08-21 22:51:26 +0000
commite613d1d0f7d4f6ee9b458c62f85c577872dce9a6 (patch)
treea21abb94cf79c2bcd054142ddce89773e2d4c899 /tools/lib/bpf/libbpf.c
parentlibbpf: Add elf_resolve_syms_offsets function (diff)
downloadkernel-e613d1d0f7d4f6ee9b458c62f85c577872dce9a6.tar.gz
kernel-e613d1d0f7d4f6ee9b458c62f85c577872dce9a6.zip
libbpf: Add elf_resolve_pattern_offsets function
Adding elf_resolve_pattern_offsets function that looks up offsets for symbols specified by pattern argument. The 'pattern' argument allows wildcards (*?' supported). Offsets are returned in allocated array together with its size and needs to be released by the caller. Signed-off-by: Jiri Olsa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r--tools/lib/bpf/libbpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index c05dd32910e0..88a38e607959 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -10569,7 +10569,7 @@ struct bpf_link *bpf_program__attach_ksyscall(const struct bpf_program *prog,
}
/* Adapted from perf/util/string.c */
-static bool glob_match(const char *str, const char *pat)
+bool glob_match(const char *str, const char *pat)
{
while (*str && *pat && *pat != '*') {
if (*pat == '?') { /* Matches any single character */