summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/bpf_core_read.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-12-13 17:43:32 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-12-15 15:58:05 -0800
commit01af3bf06755dc5cda7050fe5d898998e5775e63 (patch)
treefbfacf758d2ebf276a6ed08123ada06e8ae28f5e /tools/lib/bpf/bpf_core_read.h
parent9f81654eebe8de7e0db15534816d8f6c84b2e1e5 (diff)
libbpf: Expose BPF program's function name
Add APIs to get BPF program function name, as opposed to bpf_program__title(), which returns BPF program function's section name. Function name has a benefit of being a valid C identifier and uniquely identifies a specific BPF program, while section name can be duplicated across multiple independent BPF programs. Add also bpf_object__find_program_by_name(), similar to bpf_object__find_program_by_title(), to facilitate looking up BPF programs by their C function names. Convert one of selftests to new API for look up. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20191214014341.3442258-9-andriin@fb.com
Diffstat (limited to 'tools/lib/bpf/bpf_core_read.h')
0 files changed, 0 insertions, 0 deletions