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

Sean Silva via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 11:51:40 PDT 2017


silvas added inline comments.


================
Comment at: ELF/Relocations.cpp:207
 
+  if (Target->isTlsInitialExecRel(Type) || Target->isTlsLocalExecRel(Type))
+    Target->StaticTlsModel = true;
----------------
ruiu wrote:
> I don't want to bury this code deep inside the relocation processing like this. Can you create a different for loop that visits each input section's Relocations vector elements to see if there's a TLS relocation?
Need to measure performance if it is a separate for loop though (like for any change adding O(number of relocations) work). Putting it here does a very small amount of extra work (since it guarded by e.g. `Body.isTLS()`), though it is less clean.


https://reviews.llvm.org/D32354





More information about the llvm-commits mailing list