ubpf
ubpf copied to clipboard
ELF64_R_TYPE from clang is 10 not 2
trafficstars
Hi guys, thanks for pulling this repo together. Very interesting read. When reviewing the code I noticed that you expect relocation type 2. I think clang produces ELF code with relocation type 10 (R_BPF_64_32) Thanks Rolf
clang-3.9 and below produces relocation type 2. clang-6.0 produces relocation type 10. I saw DPDK's BPF library does not check relocation type: https://github.com/DPDK/dpdk/blob/219a6e74cab5c6a8cefc7bd2b0f18275835fef2f/lib/librte_bpf/bpf_load_elf.c#L199-L202 Maybe uBPF can ignore it as well?