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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 08:38:59 PDT 2017


grimar created this revision.

This is PR32437.

DF_STATIC_TLS
If set in a shared object or executable, this flag instructs the dynamic linker to reject attempts to load this file dynamically. It indicates that the shared object or executable contains code using a static thread-local storage scheme. Implementations need not support any form of thread-local storage.

Patch checks if IE/LE relocations were used to check if code uses static model. If so it sets the DF_STATIC_TLS flag.
Patch contains testcases for i386 target for now.


https://reviews.llvm.org/D32354

Files:
  ELF/Relocations.cpp
  ELF/SyntheticSections.cpp
  ELF/Target.cpp
  ELF/Target.h
  test/ELF/Inputs/i386-static-tls-model1.s
  test/ELF/Inputs/i386-static-tls-model2.s
  test/ELF/Inputs/i386-static-tls-model3.s
  test/ELF/Inputs/i386-static-tls-model4.s
  test/ELF/aarch64-tls-ie.s
  test/ELF/i386-static-tls-model.s
  test/ELF/i386-tls-ie-shared.s
  test/ELF/tls-dynamic-i686.s
  test/ELF/tls-dynamic.s
  test/ELF/tls-got.s
  test/ELF/tls-initial-exec-local.s
  test/ELF/tls-opt-iele-i686-nopic.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32354.96149.patch
Type: text/x-patch
Size: 23223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170421/91f44560/attachment.bin>


More information about the llvm-commits mailing list