This change make phdr_tls_data to be the address of the TLS segment for current thread, both for static and dynamic binaries.
Also it adds _get_tp() libc function that returns TCB. Its existence makes many things in TLS handling easier (but I did not converted all __tls_get_address() to use _get_tp()).
Per-commit split of the diff can be seen at https://kib.kiev.ua/git/gitweb.cgi?p=deviant3.git;a=shortlog;h=refs/heads/phdr_tls_data
I would appreciate both review and even more, test of the patch on non-x86 architectures. In fact, even checking that TLS still works is great. Since there is a regression in dl_iterate_phdr() fixed by this change, I want to commit this ASAP (and do not want to revert the buggy commit due to versioning changes included)