Update.
* elf/dl-open.c (dl_open_worker): Only bump the generation counter if this is really necessary.
This commit is contained in:
parent
a04586d84d
commit
d552a4310c
@ -1,5 +1,8 @@
|
|||||||
2002-02-13 Ulrich Drepper <drepper@redhat.com>
|
2002-02-13 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-open.c (dl_open_worker): Only bump the generation counter
|
||||||
|
if this is really necessary.
|
||||||
|
|
||||||
* elf/dl-close.c (_dl_close): Implement freeing entries in the
|
* elf/dl-close.c (_dl_close): Implement freeing entries in the
|
||||||
slotinfo array.
|
slotinfo array.
|
||||||
(free_mem): Free memory for the slotinfo array if possible.
|
(free_mem): Free memory for the slotinfo array if possible.
|
||||||
|
@ -155,6 +155,9 @@ dl_open_worker (void *a)
|
|||||||
const char *dst;
|
const char *dst;
|
||||||
int lazy;
|
int lazy;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
#ifdef USE_TLS
|
||||||
|
bool any_tls;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Maybe we have to expand a DST. */
|
/* Maybe we have to expand a DST. */
|
||||||
dst = strchr (file, '$');
|
dst = strchr (file, '$');
|
||||||
@ -292,6 +295,12 @@ dl_open_worker (void *a)
|
|||||||
l = l->l_prev;
|
l = l->l_prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_TLS
|
||||||
|
/* We normally don't bump the TLS generation counter. There must be
|
||||||
|
actually a need to do this. */
|
||||||
|
any_tls = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Increment the open count for all dependencies. If the file is
|
/* Increment the open count for all dependencies. If the file is
|
||||||
not loaded as a dependency here add the search list of the newly
|
not loaded as a dependency here add the search list of the newly
|
||||||
loaded object to the scope. */
|
loaded object to the scope. */
|
||||||
@ -415,10 +424,14 @@ dl_open_worker (void *a)
|
|||||||
/* Add the information into the slotinfo data structure. */
|
/* Add the information into the slotinfo data structure. */
|
||||||
listp->slotinfo[idx].map = new->l_searchlist.r_list[i];
|
listp->slotinfo[idx].map = new->l_searchlist.r_list[i];
|
||||||
listp->slotinfo[idx].gen = GL(dl_tls_generation) + 1;
|
listp->slotinfo[idx].gen = GL(dl_tls_generation) + 1;
|
||||||
|
|
||||||
|
/* We have to bump the generation counter. */
|
||||||
|
any_tls = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bump the generation number. */
|
/* Bump the generation number if necessary. */
|
||||||
++GL(dl_tls_generation);
|
if (any_tls)
|
||||||
|
++GL(dl_tls_generation);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Run the initializer functions of new objects. */
|
/* Run the initializer functions of new objects. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user