On 5/22/21 9:39 AM, Yonghong Song wrote:
LLVM upstream commit https://reviews.llvm.org/D102712 made some changes to bpf relocations to make them llvm linker lld friendly. The scope of existing relocations R_BPF_64_{64,32} is narrowed and new relocations R_BPF_64_{ABS32,ABS64,NODYLD32} are introduced.
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@xxxxxx/ In most cases, you should just change relocation enum number, no relocation resolution is changed. Please let me know. Thanks!
Let us add some documentation about llvm bpf relocations so people can understand how to resolve them properly in their respective tools. Cc: John Fastabend <john.fastabend@xxxxxxxxx> Cc: Lorenz Bauer <lmb@xxxxxxxxxxxxxx> Signed-off-by: Yonghong Song <yhs@xxxxxx> --- Documentation/bpf/index.rst | 1 + Documentation/bpf/llvm_reloc.rst | 168 +++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+) create mode 100644 Documentation/bpf/llvm_reloc.rst
[..]