ubpf icon indicating copy to clipboard operation
ubpf copied to clipboard

ELF64_R_TYPE from clang is 10 not 2

Open rolfandersson opened this issue 7 years ago • 1 comments
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

rolfandersson avatar May 03 '18 11:05 rolfandersson

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?

yoursunny avatar Apr 05 '19 17:04 yoursunny