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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 06:16:54 PST 2019


grimar created this revision.
grimar added a reviewer: ruiu.
Herald added subscribers: krytarowski, arichardson.
Herald added a reviewer: espindola.

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.

Patch checks if IE/LE relocations were used to check if the code uses a static model. If so it sets the DF_STATIC_TLS flag.

It is based on D32354 <https://reviews.llvm.org/D32354> which was reverted because we decided to not support the DF_STATIC_TLS at that time.
But now it will be used in FreeBSD.


https://reviews.llvm.org/D57749

Files:
  ELF/Arch/X86.cpp
  ELF/Config.h
  ELF/SyntheticSections.cpp
  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/i386-static-tls-model.s
  test/ELF/i386-tls-ie-shared.s
  test/ELF/tls-dynamic-i686.s
  test/ELF/tls-opt-iele-i686-nopic.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57749.185294.patch
Type: text/x-patch
Size: 13753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/f966897f/attachment.bin>


More information about the llvm-commits mailing list