[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#413787: libc0.3: TLS patch
From: |
Thomas Schwinge |
Subject: |
Re: Bug#413787: libc0.3: TLS patch |
Date: |
Wed, 7 Mar 2007 19:49:15 +0100 |
User-agent: |
Mutt/1.5.11 |
Hello!
On Wed, Mar 07, 2007 at 10:51:21AM +0100, Samuel Thibault wrote:
> Thomas Schwinge, le Wed 07 Mar 2007 10:32:00 +0100, a ?crit :
> > On Wed, Mar 07, 2007 at 03:06:22AM +0100, Samuel Thibault wrote:
> > > Thanks to Barry's long glibc builds, here is at last a patch that builds
> > > a tls/__thread -enabled and working glibc.
> >
> > Great!
>
> BTW, by "working", I mean that simple programs do work, event with
> __thread variables.
:-)
I'm just about to start a build of glibc-2_5-branch, even though I won't
have the time to really have a look at it.
> > Can you comment on the issues mentioned at
> > <http://savannah.gnu.org/bugs/?17644#comment2>?
>
> Mmm, which issues?
The Jeroen patch (<http://www.dekkers.cx/hurd/glibc-tls.patch>)...
#v+
Index: sysdeps/mach/hurd/dl-sysdep.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/dl-sysdep.c,v
retrieving revision 1.78
diff -u -p -r1.78 dl-sysdep.c
--- sysdeps/mach/hurd/dl-sysdep.c 6 Sep 2004 21:31:38 -0000 1.78
+++ sysdeps/mach/hurd/dl-sysdep.c 18 Sep 2005 13:34:50 -0000
@@ -63,8 +63,10 @@ hp_timing_t _dl_cpuclock_offset;
struct hurd_startup_data *_dl_hurd_data;
/* This is used only within ld.so, via dl-minimal.c's __errno_location. */
+#ifndef USE___THREAD
#undef errno
int errno attribute_hidden;
+#endif
/* Defining these variables here avoids the inclusion of hurdsig.c. */
unsigned long int __hurd_sigthread_stack_base;
Index: sysdeps/mach/hurd/fork.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/fork.c,v
retrieving revision 1.56
diff -u -p -r1.56 fork.c
--- sysdeps/mach/hurd/fork.c 27 Oct 2004 07:47:10 -0000 1.56
+++ sysdeps/mach/hurd/fork.c 18 Sep 2005 13:34:51 -0000
@@ -537,7 +537,7 @@ __fork (void)
LOSE;
#endif
- if (err = __thread_set_state (thread, MACHINE_THREAD_STATE_FLAVOR,
+ if (err = __thread_set_state (thread, i386_REGS_SEGS_STATE,
(natural_t *) &state, statecount))
LOSE;
#v-
... and his comments...
#v+
| <Jeroen> http://www.dekkers.cx/hurd/glibc-tls.patch
| <Jeroen> the fork fix isn't the right one
| <Jeroen> because the define is i386-specific
| <Jeroen> we should probably define a MACHINE_THREAD_STATE_FLAVOR2 to
| i386_REGS_SEGS_STATE or something, roland will probably know the
| cleanest solution
| <Jeroen> with that patch you can run programs
| <Jeroen> but dlopen() doesn't work
| <Jeroen> maybe other things don't work either
| <Jeroen> but the basic TLS things work :)
#v-
Or isn't that relevant anymore?
Regards,
Thomas
signature.asc
Description: Digital signature