This forces all maps to the maps section so we remain compatible with
libbpf. This requires #181 to avoid breaking userspace.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This commit uses the symbol table to discover all maps inside an ELF
section. Instead of doing what libbpf does - divide the section data
in to equal sized chunks - we read in to section data using the
symbol address and offset, thus allowing us to support definitions
of varying lengths.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This allows for C code to be compiled and used in tests!
It does require libbpf on the host machine though...
Also moved removal of the `user` and `ebpf` dirs created by rust-script
into `lib.sh` and parameterized bits of the XDP smoke test for ease of
copying
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This uses a mix of rust-script, bash, qemu and a test runner called RTF
to add a regression test suite... and wires it into GitHub Actions
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>