[ELF] - Set DF_STATIC_TLS flag for i386 target.

Authored by grimar on May 8 2017, 3:24 AM.


[ELF] - Set DF_STATIC_TLS flag for i386 target.

This is PR32437.

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.

Differential revision: https://reviews.llvm.org/D32354

llvm-svn: 302414