From or1k-glibc from blueCmd, his commit "Fix TLS, removed too much in rebase". Signed-off-by: Stafford Horne <shorne@gmail.com>
@@ -16,8 +16,8 @@
not, see <http://www.gnu.org/licenses/>. */
/* Value passed to 'clone' for initialization of the thread register. */
-#define TLS_VALUE (pd + 1)
+#define TLS_VALUE ((void *) (pd) \
-
+ + TLS_PRE_TCB_SIZE + TLS_INIT_TCB_SIZE)
/* Get the real implementation. */
#include <sysdeps/pthread/createthread.c>