[PATCH] Make IA-64 --with-tls --without-__thread LinuxThreads ld.so work again with NPTL libc/libpthread
Jakub Jelinek
jakub@redhat.com
Mon Dec 29 16:57:00 GMT 2003
Hi!
2003-12-29 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/tls.h: Include dl-sysdep.h.
(INIT_SYSINFO): Define.
(TLS_INIT_TP): Use it.
--- libc/linuxthreads/sysdeps/ia64/tls.h.jj 2003-08-06 20:36:13.000000000 +0200
+++ libc/linuxthreads/sysdeps/ia64/tls.h 2003-12-29 17:36:09.000000000 +0100
@@ -22,6 +22,7 @@
#ifndef __ASSEMBLER__
+# include <dl-sysdep.h>
# include <pt-machine.h>
# include <stddef.h>
@@ -80,11 +81,18 @@ typedef struct
# define GET_DTV(tcbp) \
(((tcbhead_t *) (tcbp))->dtv)
+#if defined NEED_DL_SYSINFO
+# define INIT_SYSINFO \
+ (((tcbhead_t *)__thread_self)->private = GL(dl_sysinfo))
+#else
+# define INIT_SYSINFO 0
+#endif
+
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
- (__thread_self = (__typeof (__thread_self)) (tcbp), NULL)
+ (__thread_self = (__typeof (__thread_self)) (tcbp), INIT_SYSINFO, NULL)
/* Return the address of the dtv for the current thread. */
# define THREAD_DTV() \
Jakub
More information about the Libc-hacker
mailing list