[PATCH] D48090: [PPC64] global dynamic to initial exec relaxation

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 09:05:24 PDT 2018


sfertile added a comment.

In https://reviews.llvm.org/D48090#1130092, @ruiu wrote:

> Can you give me a pointer to the spec describing these relaxations?


Yep, the abi has a section describing each of the tls relaxations: http://openpowerfoundation.org/wp-content/uploads/resources/leabi/content/dbdoclet.50655241_61284.html



================
Comment at: ELF/Relocations.h:70
   R_RELAX_TLS_GD_TO_IE_END,
+  R_RELAX_TLS_GD_TO_IE_GOT_OFF,
   R_RELAX_TLS_GD_TO_IE_PAGE_PC,
----------------
ruiu wrote:
> Did you really have to add these two new types? I'm not claiming that they are unnecessary, I'm just wondering, so could you please explain why the existing types don't work for you?
For `R_RELAX_TLS_GD_TO_IE_GOT_OFF`  I don't //have// to add it. I could use the _ABS version and subtract the TocBase from the result in the PPC target code. Either way I have to adjust the value passed to `relaxTlsGdToIe` (by the TocOffset if passed the GotOffset and by TocBase if passed the syms VA)  so there isn't much diffrence between them. I picked adding the new RelExpr simply for clarity since the instructions in the relaxed sequence use a got-offset and not the syms VA.

For `R_TLSGD_HINT` I think I can actually use `R_TLSDESC_CALL` instead. When I initially looked at R_TLSDESC_CALL I thought there was something it generated that was different from what I needed, but going over it again it looks like its a perfect fit.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48090





More information about the llvm-commits mailing list