[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
Mon Feb 4 09:23:54 PST 2019
sfertile accepted this revision.
sfertile added a comment.
This revision is now accepted and ready to land.
LGTM other then 1 minor comment.
================
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)
----------------
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.```
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