[PATCH] D18960: [lld] Initial implementation of TLSDESC relocation handling

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 15:27:02 PDT 2016


rafael added a comment.

The main issue is that this adds the notion of tls descriptor base relocations while the code for the existing relocation processing is still not finalized.

I would like to make sure we at least have a clean framework for creating and optimizing relocations before adding more kinds of them.


================
Comment at: ELF/InputSection.cpp:160
@@ +159,3 @@
+    return Body.getGotPltTlsDescVA<ELFT>() + A;
+  case R_TLSDESC_PAGE:
+    return getAArch64Page(Body.getGotPltTlsDescVA<ELFT>() + A) -
----------------
ruiu wrote:
> You are not using T_TLSDESC_PAGE. Please remove.
I would call it PAGE_PC since it is relative to the PC.

================
Comment at: ELF/OutputSections.h:297
@@ -287,2 +296,3 @@
   std::vector<DynamicReloc<ELFT>> Relocs;
+  std::vector<DynamicReloc<ELFT>> TlsDescRelocs;
 };
----------------
Why do you need the second vector? It seems you just relocate it at the same time as Relocs.


http://reviews.llvm.org/D18960





More information about the llvm-commits mailing list