Re: TLS details on Linux for x86 and x64

2017-12-02 Thread Andrew Haley
On 02/12/17 14:04, Liu Hao wrote: > > 0) What is the magical `@tpoff` suffix supposed to do? The `@ntpoff` and > `@dtpoff` things are documented in System V ABI but there doesn't seem > to be anything about `@tpoff`. > 1) How does LD tell that `b` (a thread-local integer) is different from > `a` (

TLS details on Linux for x86 and x64

2017-12-02 Thread Liu Hao
Dear x86 and x64 developers, I and JonY are fumbling for implementation of native TLS support for x86 and x64 on Windows. Similarly to that on Linux, the address of a thread local object on Windows is calculated via indirection from the FS or GS segment register, but requires more than one steps.