[PATCH] D18330: [ELF/AArch64] Implemented set of R_AARCH64_TLSDESC_* relocations.

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 11:43:31 PDT 2016


emaste added inline comments.

================
Comment at: ELF/InputSection.cpp:275
@@ +274,3 @@
+    // compute the value of the two words of the TLS descriptor.
+    // Overall design can be found in
+    // "Thread-Local Storage Descriptors for IA32 and AMD64/EM64T"
----------------
zatrazz wrote:
> emaste wrote:
> > Maybe mention "is based on" or such to make it clear this wasn't accidentally copied and pasted from X86-specific stuff.
> What about:
> 
> // TLS descriptor uses two words in the .got.plt which describes a structure
> // of a function pointer and its arguments. Both fields will be adjusted  at 
> // runtime by the dynamic loader with a single relocation (usually
> // R_<ARCH>_TLSDESC).
Makes sense to me.

================
Comment at: ELF/OutputSections.cpp:293
@@ +292,3 @@
+  // Tail here is amount of such special relocations.
+  Relocs.insert(Relocs.end() - Tail, Reloc);
+}
----------------
zatrazz wrote:
> emaste wrote:
> > I wonder if there's a nicer way to handle this?
> I though about this, but I think to remove the Tail it would require to maintain two or move relocation vectors (one for normal and another for tlsdesc) and this will just add more complexity IMHO.
> 
> However we might change in later if this shows to be a performance issue.
> However we might change in later if this shows to be a performance issue.

To me having two vectors seems more clear. Anyway, we can certainly try it both ways alter on and evaluate the performance difference.


Repository:
  rL LLVM

http://reviews.llvm.org/D18330





More information about the llvm-commits mailing list