summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-11 00:57:37 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-11 00:57:37 +0000
commita330abe2cd2b8cf8dd78ba82dadeab725b41adae (patch)
tree2df0840f0ede5a3a99cb9b28cada76956fe6cd9a /elf
parent03af57939c7216333e000f5e45eae99a99cc5444 (diff)
downloadglibc-a330abe2cd2b8cf8dd78ba82dadeab725b41adae.tar.gz
glibc-a330abe2cd2b8cf8dd78ba82dadeab725b41adae.tar.xz
glibc-a330abe2cd2b8cf8dd78ba82dadeab725b41adae.zip
Update.
	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): More changes
	required by passing pointer to last element of the list.

	* elf/dl-load.c (_dl_map_object_from_fd): Move adjustment of
	l_tls_initimage to a place where it actually is performed.

	* elf/tls-macros.h: ...here.  New file.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index da9f2a207c..1fffe72108 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1036,12 +1036,6 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
     l->l_map_start = c->mapstart + l->l_addr;
     l->l_map_end = l->l_map_start + maplength;
 
-#ifdef USE_TLS
-    /* Adjust the address of the TLS initialization image.  */
-    if (l->l_tls_initimage != NULL)
-      l->l_tls_initimage = (char *) l->l_tls_initimage + l->l_addr;
-#endif
-
     while (c < &loadcmds[nloadcmds])
       {
 	if (c->mapend > c->mapstart
@@ -1135,6 +1129,12 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
       (ElfW(Addr)) l->l_phdr += l->l_addr;
   }
 
+#ifdef USE_TLS
+    /* Adjust the address of the TLS initialization image.  */
+    if (l->l_tls_initimage != NULL)
+      l->l_tls_initimage = (char *) l->l_tls_initimage + l->l_map_start;
+#endif
+
   /* We are done mapping in the file.  We no longer need the descriptor.  */
   __close (fd);
   /* Signal that we closed the file.  */