Re: [PATCH bpf-next] docs/bpf: add llvm_reloc.rst to explain llvm bpf relocations
From: Yonghong Song <hidden>
Date: 2021-05-24 15:14:07
From: Yonghong Song <hidden>
Date: 2021-05-24 15:14:07
On 5/24/21 1:33 AM, Lorenz Bauer wrote:
On Sat, 22 May 2021 at 17:44, Yonghong Song [off-list ref] wrote:quoted
Daniel, John and Lorenz, Could you help check how the new relocation scheme may impact you? libbpf has a similar issue and is fixed by https://lore.kernel.org/bpf/20210522162341.3687617-1-yhs@fb.com/ (local) In most cases, you should just change relocation enum number, no relocation resolution is changed. Please let me know. Thanks!Thank you for the heads up :) cilium/ebpf currently doesn't look at relocation types at all for better or worse. We simply collect "well-known" sections like maps, programs, etc. and only process relocations for these. So your change won't break cilium/ebpf, but it
Thanks for confirmation. So yes, you should be fine though.
makes me wonder whether we should check the relocation type.
If the library is used in a control environment, e.g., the object file is generated by llvm, bpftool linker, etc. You should be fine. But yes, checking relocation types will make the library more robust.
Best Lorenz