tools/bpftool: Generalize BPF skeleton support and generate vmlinux.h
Adapt Makefile to support BPF skeleton generation beyond single profiler.bpf.c case. Also add vmlinux.h generation and switch profiler.bpf.c to use it. clang-bpf-global-var feature is extended and renamed to clang-bpf-co-re to check for support of preserve_access_index attribute, which, together with BTF for global variables, is the minimum requirement for modern BPF programs. Signed-off-by:Andrii Nakryiko <andriin@fb.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Reviewed-by:
Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/bpf/20200619231703.738941-7-andriin@fb.com
Showing
- tools/bpf/bpftool/.gitignore 2 additions, 1 deletiontools/bpf/bpftool/.gitignore
- tools/bpf/bpftool/Makefile 31 additions, 11 deletionstools/bpf/bpftool/Makefile
- tools/bpf/bpftool/skeleton/profiler.bpf.c 1 addition, 2 deletionstools/bpf/bpftool/skeleton/profiler.bpf.c
- tools/bpf/bpftool/skeleton/profiler.h 0 additions, 46 deletionstools/bpf/bpftool/skeleton/profiler.h
- tools/build/feature/Makefile 2 additions, 2 deletionstools/build/feature/Makefile
- tools/build/feature/test-clang-bpf-co-re.c 9 additions, 0 deletionstools/build/feature/test-clang-bpf-co-re.c
Please register or sign in to comment