[PATCH] D57673: [PPC64] Set the number of relocations processed for R_PPC64_TLS[GL]D to 2
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 08:49:41 PST 2019
sfertile added inline comments.
================
Comment at: ELF/Arch/PPC64.cpp:246
+int PPC64::getTlsGdRelaxSkip(RelType Type) const {
+ // Skip the next relocation R_PPC64_REL24 __tls_get_addr.
+ if (Type == R_PPC64_TLSGD || Type == R_PPC64_TLSLD)
----------------
MaskRay wrote:
> sfertile wrote:
> > I think we should describe it a bit more in depth as its not clear why we skip 2 unless you are familiar with PPC64 tls already. maybe along the lines of:
> >
> > ```The calls to __tls_get_addr are marked with 2 relocations on the call instructions. The first is a TLS hint to tie the call to its tls related arguments, the second relocation is the R_PPC64_REL24 used to speicfy the target of the call. When we relax the tls sequnce we no longer need the call and should skip both relocations to not create a false dependence on __tls_get_addr being defined.```
> Added a comment with your suggestion in mind. Does it look good?
Yeah, that's perfect.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57673/new/
https://reviews.llvm.org/D57673
More information about the llvm-commits
mailing list