summaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorRoman Gushchin2017-12-13 16:18:52 +0100
committerDaniel Borkmann2017-12-14 13:37:13 +0100
commitfe4d44b23f6b38194a92c6b8a50d921a071c4db4 (patch)
treedd1959a59dfadb4d0b7d9e534cc48a69cec005dc /tools/bpf/bpftool/common.c
parentlibbpf: add ability to guess program type based on section name (diff)
downloadkernel-qcow2-linux-fe4d44b23f6b38194a92c6b8a50d921a071c4db4.tar.gz
kernel-qcow2-linux-fe4d44b23f6b38194a92c6b8a50d921a071c4db4.tar.xz
kernel-qcow2-linux-fe4d44b23f6b38194a92c6b8a50d921a071c4db4.zip
libbpf: prefer global symbols as bpf program name source
Libbpf picks the name of the first symbol in the corresponding elf section to use as a program name. But without taking symbol's scope into account it may end's up with some local label as a program name. E.g.: $ bpftool prog 1: type 15 name LBB0_10 tag 0390a5136ba23f5c loaded_at Dec 07/17:22 uid 0 xlated 456B not jited memlock 4096B Fix this by preferring global symbols as program name. For instance: $ bpftool prog 1: type 15 name bpf_prog1 tag 0390a5136ba23f5c loaded_at Dec 07/17:26 uid 0 xlated 456B not jited memlock 4096B Signed-off-by: Roman Gushchin <guro@fb.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Cc: Martin KaFai Lau <kafai@fb.com> Cc: Quentin Monnet <quentin.monnet@netronome.com> Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/common.c')
0 files changed, 0 insertions, 0 deletions