On Thu, 29 Feb 2024 13:38:12 +0100 Bastian Blank <wa...@debian.org> wrote: > On Thu, Feb 29, 2024 at 12:12:21PM +0000, Luca Boccassi wrote: > > With the new vmlinux.h shipped in the headers package, the BTF case > > should be covered. > > The relevant code in Linux is: > > | quiet_cmd_btf_ko = BTF [M] $@ > | cmd_btf_ko = \ > | if [ ! -f vmlinux ]; then \ > | printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \ > | else \ > | LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) --btf_base vmlinux $@; \ > | $(RESOLVE_BTFIDS) -b vmlinux $@; \ > | fi; > > Which change is needed here to use vmlinux.h instead?
My understanding is that you don't need this command at all; the included vmlinux.h already contains the necessary type definitions for libbpf, for the kernel source version in question - ie: instead of needing to run pahole or bpftool to extract these definitions from a specific vmlinux image, this file is distributed with them already included. Colm