[PATCH] D32354: [ELF] - Set DF_STATIC_TLS flag for i386 target.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 03:38:16 PDT 2017


grimar added inline comments.


================
Comment at: ELF/Target.cpp:363
                                   const uint8_t *Loc) const {
+  // We search any TLS IE/LE relocations to find if static TLS model was used.
+  if (Type == R_386_TLS_LE || Type == R_386_TLS_LE_32 || Type == R_386_TLS_IE ||
----------------
ruiu wrote:
> I don't think that comment is useful. When you describe it, you want to make it useful for those who are not familiar with details about what you are dealing with. I'd write
> 
> // There are 4 different TLS variable models with varying degrees of flexibility and performance.  LocalExec and InitialExec models are fast but less-flexible models. They cannot be used for dlopen(). If they are in use, we set DF_STATIC_TLS in the ELF header so that the runtime can reject such DSOs.
Ok, thanks !


Repository:
  rL LLVM

https://reviews.llvm.org/D32354





More information about the llvm-commits mailing list