[PATCH] D14301: [elf2] Implement R_X86_64_TPOFF32.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 14:34:23 PST 2015


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM with a few nits.


================
Comment at: ELF/OutputSections.cpp:648
@@ +647,3 @@
+    if (DR.Sym.getType() == STT_TLS)
+      return (SC.OutSec->getVA() + SC.getOffset(DR.Sym)) -
+             Out<ELFT>::TlsInitImageVA;
----------------
Remove () from "(A + B) - C".

================
Comment at: ELF/OutputSections.h:356
@@ -355,2 +355,3 @@
 template <class ELFT> struct Out {
+  using uintX_t = typename llvm::object::ELFFile<ELFT>::uintX_t;
   static DynamicSection<ELFT> *Dynamic;
----------------
Nothing wrong with the template aliasing, but that's different from other code. Use typedef instead for consistency.

  typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;

================
Comment at: ELF/OutputSections.h:375
@@ -373,2 +374,3 @@
+  static uintX_t TlsInitImageVA;
 };
 
----------------
Bigcheese wrote:
> In 2 places vs the 18 uses of initialization image.
I have no strong preference, so I'm OK with InitImage.


http://reviews.llvm.org/D14301





More information about the llvm-commits mailing list