This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: TLS on GNU/Hurd (was Re: configure.in broken.)
- From: "Alfred M. Szmidt" <ams at kemisten dot nu>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 03 Sep 2004 14:41:25 +0200
- Subject: Re: TLS on GNU/Hurd (was Re: configure.in broken.)
- References: <20040902235928.48F0F19083@perdition.linnaean.org>
Fix for the following attched:
i386-unknown-gnu0.3-gcc dl-reloc.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -Wno-parentheses -mpreferred-stack-boundary=2 -Wno-unused -I../include -I. -I/home/ams/libc.obj/elf -I.. -I../libio -I../hurd -I/home/ams/libc.obj/hurd/ -I../mach -I/home/ams/libc.obj/mach/ -I/home/ams/libc.obj -I../sysdeps/i386/elf -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd/bsd4.4 -I../sysdeps/unix/mman -I../sysdeps/mach/i386 -I../sysdeps/mach -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix/bsd -I../sysdeps/unix/common -I../sysdeps/unix/inet -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /home/ams/libc.obj/elf/dl-reloc.o -MD -MP -MF /home/ams/libc.obj/elf/dl-reloc.o.dt -MT /home/ams/li
bc.obj/elf/dl-reloc.o
dl-reloc.c: In function `_dl_nothread_init_static_tls':
dl-reloc.c:118: warning: dereferencing `void *' pointer
dl-reloc.c:118: error: request for member `pointer' in something not a structure or union
glibc compiles after this, I haven't got access to a GNU/Hurd box
right now so I can test it. Will see what I can come up with though.
2004-09-03 Alfred M. Szmidt <ams@kemisten.nu>
* elf/dl-reloc.c (_dl_nothread_init_static_tls): New variable DTV.
Use it.
Index: elf/dl-reloc.c
===================================================================
RCS file: /cvs/glibc/libc/elf/dl-reloc.c,v
retrieving revision 1.96
diff -u -r1.96 dl-reloc.c
--- elf/dl-reloc.c 07 Mar 2004 06:21:01 +0100 1.96
+++ elf/dl-reloc.c 03 Sep 2004 14:32:41 +0200
@@ -114,7 +114,10 @@ _dl_nothread_init_static_tls (struct lin
# endif
/* Fill in the DTV slot so that a later LD/GD access will find it. */
- THREAD_DTV ()[map->l_tls_modid].pointer = dest;
+ {
+ dtv_t *dtv = THREAD_DTV ();
+ dtv[map->l_tls_modid].pointer = dest;
+ }
/* Initialize the memory. */
memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),