diff options
author | Job Noorman <jnoorman@igalia.com> | 2023-05-08 10:05:46 +0200 |
---|---|---|
committer | Job Noorman <jnoorman@igalia.com> | 2023-05-08 10:31:33 +0200 |
commit | 26ee8947702d79ce2cab8e577f713685a5ca4a55 (patch) | |
tree | bb78f040cb031fa52a3684a22a97423505d23c17 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 7c5cbe906e6b3c4da60ea898ddbb3a64b94a58cd (diff) | |
download | llvm-26ee8947702d79ce2cab8e577f713685a5ca4a55.zip llvm-26ee8947702d79ce2cab8e577f713685a5ca4a55.tar.gz llvm-26ee8947702d79ce2cab8e577f713685a5ca4a55.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions