aya
aya copied to clipboard
ebpf obj isn't compatible with libbpf v1.0+
Hi, I create a proj from socket_filter template. After compiling it to ebpf obj, I use bpftool to load it to kernel, but failed for
'libbpf: elf: legacy map definitions in 'maps' section are not supported by libbpf v1.0+' .
Here is my machine info:
# uname -a
Linux test-ThinkPad-X1 5.4.0-146-generic #163-Ubuntu SMP Fri Mar 17 18:26:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# bpftool -V
bpftool v7.4.0
using libbpf v1.4
features: llvm
I'm also running into this. I added the following to my program attempting to use a map to avoid compiled-in configuration.
#[map(name = "interview_config")]
static mut CONFIG_MAP: Array<Config> = Array::with_max_entries(1, 0);
Still not work.