partial TLS support for dynamic-linked programs

only TLS in the main program is supported so far; TLS defined in
shared libraries will not work yet.
2 files changed