about summary refs log tree commit diff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index c3a58dd921..140093c6ce 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -125,6 +125,8 @@ _dl_nothread_init_static_tls (struct link_map *map)
 
   /* Fill in the DTV slot so that a later LD/GD access will find it.  */
   dtv_t *dtv = THREAD_DTV ();
+  _dl_printf("modid=%u, counter=%u\n", map->l_tls_modid, dtv[-1].counter);
+  assert (map->l_tls_modid <= dtv[-1].counter);
   dtv[map->l_tls_modid].pointer.val = dest;
   dtv[map->l_tls_modid].pointer.is_static = true;