Open ygdyang opened 4 years ago
Unfortunately, no, CO-RE won't work unless kernel BTF is present. You need at least commit e83b9f55448a ("kbuild: add ability to generate BTF type info for vmlinux"), which is available starting from 5.2 kernels only. So yeah, in your case kernel is just too old, unfortunately.
I have build libbpf-tool on dedian 10 (kernel 4.19.0-8-amd64), but when I run opensnoop, it shows:
libbpf: kernel doesn't support global data libbpf: failed to load object 'opensnoop_bpf' libbpf: failed to load BPF skeleton 'opensnoop_bpf': -95 failed to load BPF object: -95
can libbpf CO-RE work on linux kernel version 4.19?
I did not generate the vmlinux.h for my current kernel version, because CONFIG_DEBUG_INFO_BTF seems can only found in kernel version 5.2 or newer. Is that cause the error message happen?