about summary refs log tree commit diff
path: root/csu/libc-tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'csu/libc-tls.c')
-rw-r--r--csu/libc-tls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index b3d146472d..0701ec5acb 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -125,7 +125,7 @@ __libc_setup_tls (void)
 	  /* Remember the values we need.  */
 	  memsz = phdr->p_memsz;
 	  filesz = phdr->p_filesz;
-	  initimage = phdr->p_vaddr + (void *) main_map->l_addr;
+	  initimage = (void *) dl_rx_ptr (main_map, phdr->p_vaddr);
 	  align = phdr->p_align;
 	  if (phdr->p_align > max_align)
 	    max_align = phdr->p_align;