Open tahsinrahman opened 5 years ago
/cc
Different projects grow organically with different map definition over time. Even outside of gobpf, there are different definitions.
Now a few projects rely on the convention in gobpf. But maybe gobpf could learn to parse the different ELF conventions from different projects (kernel style, perf, iproute2/tc...)?
Map definition of the elf package is different from kernel definition of bpf map.
So currently it isn't possible to load elf files that uses kernel definition of maps. It there any specific reason for not using the map structure defined in kernel?
Also, the elf package requires that maps section should start with
maps/
prefix, but all the sample codes fromsamples/bpf
directory in the kernel useSEC("maps")
. this also requires us to change map section name, recompile and load using this library.