TLS in RuntimeDyld / Linux x86_64

Hi,

We're really missing TLS in the JIT on Linux / x86_64. With
multithreading taking over the world we have more and more people
noticing that the JIT won't let them run their code. There is e.g.

- <http://lists.llvm.org/pipermail/llvm-dev/2017-February/109906.html&gt;
- <https://bugs.llvm.org/show_bug.cgi?id=21431&gt; and its dupes
<https://bugs.llvm.org/buglist.cgi?quicksearch=TargetGlobalTLSAddress&list_id=123170&gt;

which prove that we are not alone...

I'm not expert enough on x86_64 relocs to solve this one (I tried). Is
there anyone out there who might be able to help?

And yes I talked to Lang, but he is booked. He said "I think it should
be enough to support the general dynamic ELF TLS mode".

Any help is *very* much appreciated!

Cheers, Axel.

The problem is so much the relocations. There is no generic interface
for registering a "fake" module with the dynamic linker for obtaining
the normal TLS binding or forcing a resolution of a given existing
(external) symbol.

Joerg