]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: libbpf: Add btf_line_info support to libbpf
authorMartin KaFai Lau <kafai@fb.com>
Sat, 8 Dec 2018 00:42:31 +0000 (16:42 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 9 Dec 2018 21:54:38 +0000 (13:54 -0800)
commitbb791a33148b59b756d593f89083919f2a766fdb
treeea591de92250d7ff871083d63bd5823c68b9bee9
parentf0b256d01832b6e12af2188dc3e05a063da204d2
bpf: libbpf: Add btf_line_info support to libbpf

This patch adds bpf_line_info support to libbpf:
1) Parsing the line_info sec from ".BTF.ext"
2) Relocating the line_info.  If the main prog *_info relocation
   fails, it will ignore the remaining subprog line_info and continue.
   If the subprog *_info relocation fails, it will bail out.
3) BPF_PROG_LOAD a prog with line_info

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf.c
tools/lib/bpf/bpf.h
tools/lib/bpf/btf.c
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.c