[PATCH] D53906: [ARM][AArch64] Increase TLS alignment to reserve space for Android's TCB

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 8 03:35:29 PST 2019


peter.smith added a comment.

I've got a small suggestion about the comment. Otherwise I'm happy with the change. I think that it is reasonable to increase the alignment for all operating systems as the amount is not likely to be significant for platforms that make use of TLS.



================
Comment at: ELF/Writer.cpp:2183
+    if (P->p_type == PT_TLS && P->p_memsz) {
+      // Reserve extra space (8 words) between the thread pointer and an
+      // executable's TLS segment by overaligning the segment. This reservation
----------------
May I suggest moving the added code after the // The TLS pointer goes after PT_TLS for variant 2 targets comment? I think the comment here would be easier to understand if it came sequentially afterwards. It may also be worth moving the comment inside the if statement, or clarifying that it is Arm/AArch64 only at the moment.  


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53906/new/

https://reviews.llvm.org/D53906





More information about the llvm-commits mailing list