[PATCH] D149525: [JITLink][RISCV] Only generate PLT entries for external symbols
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 22:02:57 PDT 2023
StephenFan added inline comments.
================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp:80
+ return (E.getKind() == R_RISCV_CALL || E.getKind() == R_RISCV_CALL_PLT) &&
+ E.getTarget().isExternal();
}
----------------
MaskRay wrote:
> I don't know the object file model of jitlink, but adding a condition is definitely moving toward the right direction.
>
> `isExternal` looks a bit strange. If the jitlink built object files are used as executables, `!isDefined()` should be a good enough proxy.
It seems `isExternal` can exclude absolute symbols.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149525/new/
https://reviews.llvm.org/D149525
More information about the llvm-commits
mailing list