]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpftool: Generalize BPF skeleton support and generate vmlinux.h
authorAndrii Nakryiko <andriin@fb.com>
Fri, 19 Jun 2020 23:17:00 +0000 (16:17 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Jun 2020 00:01:48 +0000 (17:01 -0700)
commitcb986a973fba9764752bb3df11af63e6f4b9b96b
treed4c33d240200463799c48fc111c9e76386710461
parentd7b105c7c81a2747c1283ecae200560e1795483a
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
tools/bpf/bpftool/.gitignore
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/skeleton/profiler.bpf.c
tools/bpf/bpftool/skeleton/profiler.h [deleted file]
tools/build/feature/Makefile
tools/build/feature/test-clang-bpf-co-re.c [new file with mode: 0644]
tools/build/feature/test-clang-bpf-global-var.c [deleted file]