This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
use Initial Exec for libc var (was: Re: RFC: TLS improvements forIA32 and AMD64/EM64T)
On Sep 17, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
>> It also introduces one missing initial-exec annotation to a data
>> symbol, removing code size differences between the dynamic loaders.
This patch removes the only use of dynamic TLS from libc.so.
Index: ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* elf/dl-tsd.c (__libc_dl_error_tsd): Access static TLS with
initial exec.
Index: elf/dl-tsd.c
===================================================================
RCS file: /cvs/glibc/libc/elf/dl-tsd.c,v
retrieving revision 1.3
diff -u -p -r1.3 dl-tsd.c
--- elf/dl-tsd.c 4 Dec 2002 12:27:51 -0000 1.3
+++ elf/dl-tsd.c 22 Sep 2005 00:49:33 -0000
@@ -1,5 +1,5 @@
/* Thread-local data used by error handling for runtime dynamic linker.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,7 +49,7 @@ void **(*_dl_error_catch_tsd) (void) __a
void ** __attribute__ ((const))
__libc_dl_error_tsd (void)
{
- static __thread void *data;
+ static __thread void *data attribute_tls_model_ie;
return &data;
}
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}