This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: LinuxThreads TLS adjustment for ARM/MIPS
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: libc-ports at sourceware dot org
- Date: Sat, 12 Nov 2005 09:45:44 +0900 (JST)
- Subject: Re: LinuxThreads TLS adjustment for ARM/MIPS
- References: <20051111223031.GA30967@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> wrote:
> The relevant macro is already defined by MIPS and ARM (it leaked in when I
> contributed them). I can't test SH, so I'm leaving it alone, but I believe
> that SH would need this in order for a LinuxThreads library for old
> kernels (with --enable-tls --without-__thread) and an NPTL library for
> new kernels to coexist. Otherwise the LinuxThreads ld.so misses the NPTL
> p_errno.
I've tested the attached patch cut&patsted from ARM on SH.
Regards,
kaz
--
2005-11-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* linuxthreads/sysdeps/sh/tls.h [!FLOATING_STACKS]
(INCLUDE_TLS_PADDING): New macro.
diff -uprN ORIG/libc/ports/linuxthreads/sysdeps/sh/tls.h LOCAL/libc/ports/linuxthreads/sysdeps/sh/tls.h
--- ORIG/libc/ports/linuxthreads/sysdeps/sh/tls.h 2005-01-10 05:01:15.000000000 +0900
+++ LOCAL/libc/ports/linuxthreads/sysdeps/sh/tls.h 2005-11-12 07:55:01.000000000 +0900
@@ -51,6 +51,13 @@ typedef union dtv
/* Signal that TLS support is available. */
# define USE_TLS 1
+/* Include padding in _pthread_descr_struct so that libc can find p_errno,
+ if libpthread will only include the padding because of the !IS_IN_libpthread
+ check. */
+#ifndef FLOATING_STACKS
+# define INCLUDE_TLS_PADDING 1
+#endif
+
# ifndef __ASSEMBLER__
typedef struct