The reason was a mismatch between the levels of libxdp and libbpf in use. To fix this it was necessary to add -fPIC to the CFLAGS when building libbpf. I have raised a PR https://github.com/libbpf/libbpf/pull/631 with the fix and a little more detail as to why I need it. Please review and merge. Chris Ward, IBM