[all-commits] [llvm/llvm-project] 475278: [JITLink][RISCV] Handle R_RISCV_CALL_PLT fixups

Job Noorman via All-commits all-commits at lists.llvm.org
Fri Apr 14 00:12:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4752787cc3d9c0e4ffb9ed6962aeccc5486137cc
      https://github.com/llvm/llvm-project/commit/4752787cc3d9c0e4ffb9ed6962aeccc5486137cc
  Author: Job Noorman <jnoorman at igalia.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

  Changed paths:
    M llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp

  Log Message:
  -----------
  [JITLink][RISCV] Handle R_RISCV_CALL_PLT fixups

In the default link configuration, PLT stubs are created automatically
for R_RISCV_CALL_PLT relocations and the relocation itself is
transformed to R_RISCV_CALL (PerGraphGOTAndPLTStubsBuilder_ELF_riscv).
Only the latter is later handled when applying fixups and the former is
simply ignored.

This patch proposes to handle R_RISCV_CALL_PLT anyway when applying
fixups to support custom configurations that do not need automatic PLT
creation. An example of this is BOLT where PLT entries from the input
binary are reused (D147544).

Reviewed By: StephenFan

Differential Revision: https://reviews.llvm.org/D148238




More information about the All-commits mailing list