[all-commits] [llvm/llvm-project] 9dd5ae: [JITLink][LoongArch] Support R_LARCH_ALIGN relaxat...

ZhaoQi via All-commits all-commits at lists.llvm.org
Thu Jan 23 22:24:22 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9dd5aed4edf029d66f0c25e6ae6fae3dbb5870d8
      https://github.com/llvm/llvm-project/commit/9dd5aed4edf029d66f0c25e6ae6fae3dbb5870d8
  Author: ZhaoQi <zhaoqi01 at loongson.cn>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_loongarch.h
    M llvm/include/llvm/ExecutionEngine/JITLink/loongarch.h
    M llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
    M llvm/lib/ExecutionEngine/JITLink/loongarch.cpp
    A llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_relax_align.s

  Log Message:
  -----------
  [JITLink][LoongArch] Support R_LARCH_ALIGN relaxation (#122259)

Linker relaxation is not implemented for jitlink now. But if
relaxation is enabled by clang, R_LARCH_RELAX and
R_LARCH_ALIGN relocations will be emitted.

This commit adapts lld's algorithm to jitlink. Currently, only
relaxing R_LARCH_ALIGN is implemented. Other relaxable
relocs can be implemented in the future.

Without this, interpreting C++ code using clang-repl or running
ir using lli when relaxation is enabled will occur error: `JIT
session error: Unsupported loongarch relocation:102: R_LARCH_ALIGN`.

Similar to https://github.com/llvm/llvm-project/commit/310473c536dd4837934832d1b5454d212f15d5cc but only implement align.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list