From e2904ac4eda0882b484b11a4cbcca1643050acc4 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Thu, 8 Jan 2009 20:10:07 +0000 Subject: [PATCH] Fix tls_init() call to work in position independent code --- nptl/sysdeps/i386/tls.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index db7e2c6460..3537123b1c 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -191,8 +191,7 @@ union user_desc_init # endif #endif -__asm__(".global __gnacl_tls_init; __gnacl_tls_init = 0x1a40 "); -int __gnacl_tls_init(void const *buf, size_t size); +#include /* Code to initially initialize the thread pointer. This might need special attention since 'errno' is not yet available and if the @@ -207,7 +206,9 @@ int __gnacl_tls_init(void const *buf, size_t size); _head->self = _thrdescr; \ /* New syscall handling support. */ \ INIT_SYSINFO; \ - _result = __gnacl_tls_init (_thrdescr, 100); \ + static int (*nacl_tls_init)(void const *buf, size_t size) = \ + NACL_SYSCALL_ADDR(NACL_sys_tls_init); \ + _result = nacl_tls_init (_thrdescr, 100); \ _result == 0 ? NULL \ : "tls_init failed when setting up thread-local storage\n"; }) -- 2.11.4.GIT