summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-08-04 12:15:02 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-08-04 12:15:02 +0000
commitdcf3072d829d553abad1b87478afa78bf067a296 (patch)
tree7818415f12e1329364243dc79159202d81bf4d94
parent1af0c425deb614c3f9335a0dd2a635076c5ea640 (diff)
downloaduClibc-alpine-dcf3072d829d553abad1b87478afa78bf067a296.tar.bz2
uClibc-alpine-dcf3072d829d553abad1b87478afa78bf067a296.tar.xz
Revert recent changes to previous version at rev 20454.
Functionally the code is the same, just a matter of coding style. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r--ldso/ldso/dl-tls.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/ldso/ldso/dl-tls.c b/ldso/ldso/dl-tls.c
index a1ff5bd93..4ad9c73b7 100644
--- a/ldso/ldso/dl-tls.c
+++ b/ldso/ldso/dl-tls.c
@@ -998,19 +998,18 @@ init_tls (void)
/* Fill in the information from the loaded modules. No namespace
but the base one can be filled at this time. */
- int i = 1; /* The first module ID is 1. */
- struct elf_resolve *l;
- for (l = _dl_loaded_modules; l != NULL; l = l->next)
+ int i = 0;
+ struct link_map *l;
+ for (l = (struct link_map *) _dl_loaded_modules; l != NULL; l = l->l_next)
if (l->l_tls_blocksize != 0)
{
/* This is a module with TLS data. Store the map reference.
The generation counter is zero. */
- _dl_assert (i == l->l_tls_modid);
- slotinfo[i].map = (struct link_map *) l;
- /* slotinfo[i].gen = 0; */
- i++;
+
+ /* Skeep slot[0]: it will be never used */
+ slotinfo[++i].map = l;
}
- _dl_assert (i == _dl_tls_max_dtv_idx + 1);
+ _dl_assert (i == _dl_tls_max_dtv_idx);
/* Compute the TLS offsets for the various blocks. */
_dl_determine_tlsoffset ();