On Wed, Dec 4, 2019 at 10:03 AM John Fastabend <john.fastabend@xxxxxxxxx> wrote: > > Andrii Nakryiko wrote: > > On Wed, Dec 4, 2019 at 5:20 AM Eelco Chaudron <echaudro@xxxxxxxxxx> wrote: > > > > > [...] > > > > > > > PS: If I run the latest pahole (v1.15) on the .o files, I get the > > > following libbpf error: “libbpf: Cannot find bpf_func_info for main > > > program sec fexit/xdp_prog_simple. Ignore all bpf_func_info.” > > > > > > > pahole is not supposed to be run on BPF object file. It's needed only > > to do DWARF to BTF conversion for kernel itself. So never mind this > > one. The NULL dereference, though, seems like a bug, I agree with > > Yonghong. > > Really? I've been using pahole on BPF object files regularly mostly > to test structures match up with kernel pahole output but its always > worked on my side. Even pahole -j seems to work fine here. Well, it still works for simpler stuff, but it certainly won't emit global variables type info, CO-RE relocations, etc. BTF for BPF object files should get produced by Clang, which is perfectly capable of doing this (provided you have recent enough version of it, of course).