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>
Showing
- tools/lib/bpf/bpf.c 57 additions, 29 deletionstools/lib/bpf/bpf.c
- tools/lib/bpf/bpf.h 3 additions, 0 deletionstools/lib/bpf/bpf.h
- tools/lib/bpf/btf.c 150 additions, 59 deletionstools/lib/bpf/btf.c
- tools/lib/bpf/btf.h 9 additions, 1 deletiontools/lib/bpf/btf.h
- tools/lib/bpf/libbpf.c 20 additions, 0 deletionstools/lib/bpf/libbpf.c
Loading
Please register or sign in to comment