From a330abe2cd2b8cf8dd78ba82dadeab725b41adae Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Feb 2002 00:57:37 +0000 Subject: 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. --- elf/dl-load.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'elf') 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. */ -- cgit 1.4.1