]> git.baikalelectronics.ru Git - kernel.git/commit
tools: libbpf: expose the prog type guessing from section name logic
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 10 Jul 2018 21:42:59 +0000 (14:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 Jul 2018 20:13:33 +0000 (22:13 +0200)
commit1a63e629adc16d3f03f955f5b465fdda0729d12a
tree46028b7d5950e0aaa76e1de07aef751ef64a359a
parent2caf4a0040cafdcfc9b0a9cf82ef9cdf533d0af9
tools: libbpf: expose the prog type guessing from section name logic

libbpf can guess program type based on ELF section names.  As libbpf
becomes more popular its association between section name strings and
types becomes more of a standard.  Allow libbpf users to use the same
logic for matching strings to types, e.g. when the string originates
from command line.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h