about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-02-26 02:12:07 +0000
committerRoland McGrath <roland@gnu.org>2005-02-26 02:12:07 +0000
commita873f007cffea32297d52e8f0b19f5981a4e23b4 (patch)
tree91bf845e7c044e95cc27b433b0c5c652068dd0df /elf
parent4d0ac7b9463ba779778bfdbaa84632b635866ae8 (diff)
downloadglibc-a873f007cffea32297d52e8f0b19f5981a4e23b4.tar.gz
glibc-a873f007cffea32297d52e8f0b19f5981a4e23b4.tar.xz
glibc-a873f007cffea32297d52e8f0b19f5981a4e23b4.zip
Updated to fedora-glibc-2_3-20050226T0141
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-reloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 4004316c5a..893b3c954a 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -114,7 +114,9 @@ _dl_nothread_init_static_tls (struct link_map *map)
 # 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 ();
+  assert (map->l_tls_modid <= dtv[-1].counter);
+  dtv[map->l_tls_modid].pointer = dest;
 
   /* Initialize the memory.  */
   memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),