Cleanup and retool portions of the TLS support and make sure that
non-threaded binaries remain compatible with older kernels.
* Removes the tcb alignment argument. Instead an alignment #define is
placed in sys/tls.h
* Gets rid of the Variant I code (we can add it in later, it just gets
in the way).
* Retools the Variant II code to support %gs:OFFSET (negative offset)
AND %gs:0 relative accesses, supporting both -mtls-direct-seg-refs and
-mno-tls-direct-seg-refs.
* Changes the Elf_Addr array for the TCB into a real structure in
sys/tls.h
* Retains the DTV methodology.
* Retains the TCB methodology, but note that the area 'after' the tcb
is now available for future use (at least with Variant I removed).
Frankly I'm not sure we would ever want to support having the
'data' area after the TCB instead of before the TCB, at least not
for i386.
* Do not try to call sys_set_tls_area() if there is no TLS storage.
i.e. so non-threaded binaries remain compatible with old kernels.
The TLS is only initialized if (a) There is thread local storage, aka
gcc3's __thread keyword, or (b) The program is linked against a threading
library. The threading library makes the appropriate calls to set up the
TLS.