or1k: fix some TLS issues
commitdb4b12ae6213a28136d7622b74405c6c71c055b0
authorYann Sionneau <yann@sionneau.net>
Tue, 31 Mar 2020 06:51:31 +0000 (31 08:51 +0200)
committerWaldemar Brodkorb <wbx@openadk.org>
Wed, 1 Apr 2020 19:43:45 +0000 (1 21:43 +0200)
tree8abd01ec4ca6a45be982bb327d46eea1016c4751
parentcb6a910ab89befef46ebb6251a9800110bbd5c08
or1k: fix some TLS issues

Before this commit tst-tls-at-ctor test would segfault.
After it passes.

testsuite run before: https://pastebin.com/504JgQXa
testsuite run after: https://pastebin.com/d2aNciVt

Stafford Horne already fixed it in glibc:
* https://github.com/openrisc/or1k-glibc/blob/bcd87396ebe78228645c0731b06c934dfd88855a/sysdeps/or1k/dl-machine.h#L298
* https://github.com/openrisc/or1k-glibc/blob/bcd87396ebe78228645c0731b06c934dfd88855a/sysdeps/or1k/dl-machine.h#L99
ldso/ldso/or1k/dl-sysdep.h
ldso/ldso/or1k/elfinterp.c