[PATCH] D92841: [RISCV][NFC] Regenerate RISCV CodeGen tests
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 07:00:26 PST 2020
jrtc27 added a comment.
In D92841#2439763 <https://reviews.llvm.org/D92841#2439763>, @lenary wrote:
> The spills look right to me. The question we're not sure of is the appearance of the `@plt` suffixes on all the external calls.
RISC-V's calls are a mess. Without @plt you get an R_RISCV_CALL, and with @plt you get an R_RISCV_CALL_PLT. In LLD both are treated identically. In binutils, the latter always works (it'll get a PLT stub if needed, but not otherwise), whereas the former can cause weird things to happen if you need a PLT stub (and it's dependent on what other relocations for the symbol exist IIRC). Basically, R_RISCV_CALL should never have existed and R_RISCV_CALL_PLT should have been R_RISCV_CALL, but if you want to support linking with binutils then you need the @plt suffix unless you know the symbol will always be local.
See https://github.com/riscv/riscv-elf-psabi-doc/issues/98, https://sourceware.org/bugzilla/show_bug.cgi?id=24685 and D63076 <https://reviews.llvm.org/D63076>.
@MaskRay am I missing anything?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92841/new/
https://reviews.llvm.org/D92841
More information about the llvm-commits
mailing list