[PATCH] D66542: R_HEX_B15_PCREL_X/R_HEX_B9_PCREL_X can be in shared objects
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 22:12:38 PDT 2019
MaskRay added a comment.
R_PLT_PC and R_PC are mutually convertible.
- R_PLT_PC -> R_PC: if the target symbol is non-preemptable, an R_PLT_PC gets optimized to an R_PC, and the R_PC is considered a link-time constant.
- R_PC -> R_PLT_PC: for non-pic code pointing to an external function, an R_PC behaves as an R_PLT_PC, however, it will trigger the creation of a canonical PLT.
Generally, R_PC should be used if the target symbol may be STT_OBJECT, otherwise R_PLT_PC is preferred (because it can prevent a canonical PLT). I don't have a specification now. From the two lists of R_PC and R_PLT_PC, I guess there might be some problems so I asked for a clarification.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66542/new/
https://reviews.llvm.org/D66542
More information about the llvm-commits
mailing list