[all-commits] [llvm/llvm-project] 26ee89: [JITLink][RISCV] Only generate PLT entries for ext...
Job Noorman via All-commits
all-commits at lists.llvm.org
Mon May 8 01:32:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 26ee8947702d79ce2cab8e577f713685a5ca4a55
https://github.com/llvm/llvm-project/commit/26ee8947702d79ce2cab8e577f713685a5ca4a55
Author: Job Noorman <jnoorman at igalia.com>
Date: 2023-05-08 (Mon, 08 May 2023)
Changed paths:
M llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
M llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s
Log Message:
-----------
[JITLink][RISCV] Only generate PLT entries for external symbols
R_RISCV_CALL has been deprecated. [1] Both GCC and LLVM seem to not
generate it anymore and always use R_RISCV_CALL_PLT (even for calls that
do not need a PLT entry). Generating PLT entries based on relocation
type is not recommended and a better heuristic is to only generate them
when the target symbol is preemptable [2]. This patch implements this by
only generating PLT entries for undefined symbols.
[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/340
[2] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/98
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D149525
More information about the All-commits
mailing list