aya icon indicating copy to clipboard operation
aya copied to clipboard

ebpf obj isn't compatible with libbpf v1.0+

Open q9good opened this issue 10 months ago • 2 comments

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

q9good avatar Mar 28 '24 06:03 q9good

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);

ecbaldwin avatar Jul 12 '24 04:07 ecbaldwin

Still not work.

pomoke avatar Jul 25 '24 08:07 pomoke