aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-07 03:53:17 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-07 03:53:17 +0000
commita53a253b90b2cd722ac6718464931cf920b56cf4 (patch)
treefdf6e83d7289a69e54ddc57034dcf3fcd669ae69 /elf
parentfb190a0440e589117988d825dbcbc12c415a2fa9 (diff)
downloadglibc-a53a253b90b2cd722ac6718464931cf920b56cf4.tar
glibc-a53a253b90b2cd722ac6718464931cf920b56cf4.tar.gz
glibc-a53a253b90b2cd722ac6718464931cf920b56cf4.tar.bz2
glibc-a53a253b90b2cd722ac6718464931cf920b56cf4.zip
(_dl_map_object_from_fd): Store alignment requirement along with the other info in the link map. Change queueing of init images for double linked list. Use _dl_next_tls_modid to compute l_tls_modid.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index b131219cfc..da9f2a207c 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -942,6 +942,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
#ifdef USE_TLS
case PT_TLS:
l->l_tls_blocksize = ph->p_memsz;
+ l->l_tls_align = ph->p_align;
l->l_tls_initimage_size = ph->p_filesz;
/* Since we don't know the load address yet only store the
offset. We will adjust it later. */
@@ -951,15 +952,19 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
It is created as a circular list so that we can easily
append to it. */
if (GL(dl_initimage_list) == NULL)
- GL(dl_initimage_list) = l->l_tls_nextimage = l;
+ GL(dl_initimage_list) = l->l_tls_nextimage = l->l_tls_previmage
+ = l;
else
{
- l->l_tls_nextimage = GL(dl_initimage_list);
+ l->l_tls_nextimage = GL(dl_initimage_list)->l_tls_nextimage;
+ l->l_tls_nextimage->l_tls_previmage = l;
+ l->l_tls_previmage = GL(dl_initimage_list);
+ l->l_tls_previmage->l_tls_nextimage = l;
GL(dl_initimage_list) = l;
}
/* Assign the next available module ID. */
- l->l_tls_modid = ++GL(dl_tls_module_cnt);
+ l->l_tls_modid = _dl_next_tls_modid ();
break;
#endif
}