summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-03-08 05:44:56 +0000
committerUlrich Drepper <drepper@redhat.com>2008-03-08 05:44:56 +0000
commit93025f9373f4efde62aab31aa03c4744fd3bed62 (patch)
treea3af6e5eb6fb65c5ab6c4d0d83464c5925534d7a
parentc71665ad060cd30c99399d7a4fa47566eaf8b961 (diff)
downloadglibc-93025f9373f4efde62aab31aa03c4744fd3bed62.tar.gz
glibc-93025f9373f4efde62aab31aa03c4744fd3bed62.tar.xz
glibc-93025f9373f4efde62aab31aa03c4744fd3bed62.zip
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Add
	_dl_tls_get_addr_soft element.
	* elf/rtld.c (rtld_global_ro): Initialize _dl_tls_get_addr_soft.
	* elf/Versions (ld): Don't export _dl_tls_get_addr_soft.
	* dlfcn/dlinfo.c (dlinfo_doit): Access dl_tls_get_addr_soft through
	GLRO.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
	* elf/dl-tls.c (_dl_tls_get_addr_soft): Use attribute_hidden instead
	of internal_function.
-rw-r--r--ChangeLog10
-rw-r--r--dlfcn/dlinfo.c4
-rw-r--r--elf/Versions1
-rw-r--r--elf/dl-iteratephdr.c4
-rw-r--r--elf/dl-tls.c4
-rw-r--r--elf/rtld.c5
-rw-r--r--sysdeps/generic/ldsodefs.h5
7 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index ea4e62b1e7..7a6db2d8ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Add
+	_dl_tls_get_addr_soft element.
+	* elf/rtld.c (rtld_global_ro): Initialize _dl_tls_get_addr_soft.
+	* elf/Versions (ld): Don't export _dl_tls_get_addr_soft.
+	* dlfcn/dlinfo.c (dlinfo_doit): Access dl_tls_get_addr_soft through
+	GLRO.
+	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
+	* elf/dl-tls.c (_dl_tls_get_addr_soft): Use attribute_hidden instead
+	of internal_function.
+
 	* stdlib/Makefile (aux): Add tens_in_limb.
 	* stdlib/strtod_l.c: Move _tens_in_limb definition to...
 	* stdlib/tens_in_limb.c: ...here.  New file.
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c
index b3a3e13899..e8585ea989 100644
--- a/dlfcn/dlinfo.c
+++ b/dlfcn/dlinfo.c
@@ -1,5 +1,5 @@
 /* dlinfo -- Get information from the dynamic linker.
-   Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2006, 2007, 2008 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
@@ -101,7 +101,7 @@ RTLD_SELF used in code not dynamically loaded"));
       {
 	void *data = NULL;
 	if (l->l_tls_modid != 0)
-	  data = _dl_tls_get_addr_soft (l);
+	  data = GLRO(dl_tls_get_addr_soft) (l);
 	*(void **) args->arg = data;
 	break;
       }
diff --git a/elf/Versions b/elf/Versions
index 967ebdb3a5..87e27c5a7a 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -57,7 +57,6 @@ ld {
     _dl_allocate_tls; _dl_deallocate_tls;
     _dl_get_tls_static_info; _dl_allocate_tls_init;
     _dl_tls_setup; _dl_rtld_di_serinfo;
-    _dl_tls_get_addr_soft;
     _dl_make_stack_executable;
     # Only here for gdb while a better method is developed.
     _dl_debug_state;
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c
index 55cf10852e..c49671583b 100644
--- a/elf/dl-iteratephdr.c
+++ b/elf/dl-iteratephdr.c
@@ -1,5 +1,5 @@
 /* Get loaded objects program headers.
-   Copyright (C) 2001,2002,2003,2004,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004,2006,2007,2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
 
@@ -72,7 +72,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
       info.dlpi_tls_data = NULL;
       info.dlpi_tls_modid = l->l_tls_modid;
       if (info.dlpi_tls_modid != 0)
-	info.dlpi_tls_data = _dl_tls_get_addr_soft (l);
+	info.dlpi_tls_data = GLRO(dl_tls_get_addr_soft) (l);
       ret = callback (&info, sizeof (struct dl_phdr_info), data);
       if (ret)
 	break;
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 3059481043..deed47249f 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  Generic version.
-   Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 2002,2003,2004,2005,2006,2008 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
@@ -758,7 +758,7 @@ __tls_get_addr (GET_ADDR_ARGS)
 /* Look up the module's TLS block as for __tls_get_addr,
    but never touch anything.  Return null if it's not allocated yet.  */
 void *
-internal_function
+attribute_hidden
 _dl_tls_get_addr_soft (struct link_map *l)
 {
   if (__builtin_expect (l->l_tls_modid == 0, 0))
diff --git a/elf/rtld.c b/elf/rtld.c
index 98817d9fa0..9497e5d43f 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1,5 +1,5 @@
 /* Run time dynamic linker.
-   Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1995-2006, 2007, 2008 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
@@ -161,7 +161,8 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
     ._dl_lookup_symbol_x = _dl_lookup_symbol_x,
     ._dl_check_caller = _dl_check_caller,
     ._dl_open = _dl_open,
-    ._dl_close = _dl_close
+    ._dl_close = _dl_close,
+    ._dl_tls_get_addr_soft = _dl_tls_get_addr_soft
   };
 /* If we would use strong_alias here the compiler would see a
    non-hidden definition.  This would undo the effect of the previous
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 958a099b82..580e1e3953 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -1,5 +1,5 @@
 /* Run-time dynamic linker data structures for loaded ELF shared objects.
-   Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1995-2006, 2007, 2008 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
@@ -655,6 +655,7 @@ struct rtld_global_ro
   void *(*_dl_open) (const char *file, int mode, const void *caller_dlopen,
 		     Lmid_t nsid, int argc, char *argv[], char *env[]);
   void (*_dl_close) (void *map);
+  void *(*_dl_tls_get_addr_soft) (struct link_map *);
 
   /* List of auditing interfaces.  */
   struct audit_ifaces *_dl_audit;
@@ -1069,7 +1070,7 @@ extern struct link_map *_dl_update_slotinfo (unsigned long int req_modid);
 
 /* Look up the module's TLS block as for __tls_get_addr,
    but never touch anything.  Return null if it's not allocated yet.  */
-extern void *_dl_tls_get_addr_soft (struct link_map *l) internal_function;
+extern void *_dl_tls_get_addr_soft (struct link_map *l) attribute_hidden;
 
 extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr)
      internal_function attribute_hidden;