diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-08-26 18:03:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-08-26 18:03:49 +0000 |
commit | 6075607b9abba5ae10b87a9913f2a26548021272 (patch) | |
tree | 7072999d05ec4068a5f71737f7a53c5660becb27 /elf | |
parent | 00a2f9aa41a4f2a441c3b9787ca1a7701632de5f (diff) | |
download | glibc-6075607b9abba5ae10b87a9913f2a26548021272.tar glibc-6075607b9abba5ae10b87a9913f2a26548021272.tar.gz glibc-6075607b9abba5ae10b87a9913f2a26548021272.tar.bz2 glibc-6075607b9abba5ae10b87a9913f2a26548021272.zip |
Update.
1998-08-26 17:48 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-close.c (_dl_close): Move map->l_nsearchlist value into local
variable so that map can be freed.
Reported by Philippe Troin <phil@fifi.org>.
* elf/dl-open.c (dl_open_worker): Correct test for extending global
scope array.
Patch by Philippe Troin <phil@fifi.org>.
1998-08-26 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/register-dump.h: Rewrite. Much nicer this way.
Don't call writev() with a 100-element vector.
* sysdeps/generic/segfault.c (catch_segfault): Skip top-level NULL
return address.
* sysdeps/powerpc/elf/libc-start.c: Sync up with generic version.
In particular, set __libc_stack_end.
* sysdeps/powerpc/elf/start.S: Allow _init and _fini to be
undefined. Fix copyright notice.
1998-08-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/Makefile (gmp-objs): New variable.
($(objpfx)atest-exp, $(objpfx)atest-sincos, $(objpfx)atest-exp2):
Depend on it.
(tests): Add atest-exp atest-sincos atest-exp2.
(tests-static): Remove atest-exp atest-sincos atest-exp2.
* elf/rtld.c (dl_main): Unload map file before jumping to user code.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-close.c | 8 | ||||
-rw-r--r-- | elf/dl-open.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c index e1ca142a69..8e613eb3eb 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -38,6 +38,7 @@ internal_function _dl_close (struct link_map *map) { struct link_map **list; + unsigned nsearchlist; unsigned int i; if (map->l_opencount == 0) @@ -56,9 +57,10 @@ _dl_close (struct link_map *map) } list = map->l_searchlist; + nsearchlist = map->l_nsearchlist; /* Call all termination functions at once. */ - for (i = 0; i < map->l_nsearchlist; ++i) + for (i = 0; i < nsearchlist; ++i) { struct link_map *imap = list[i]; if (imap->l_opencount == 1 && imap->l_type == lt_loaded @@ -83,12 +85,12 @@ _dl_close (struct link_map *map) /* The search list contains a counted reference to each object it points to, the 0th elt being MAP itself. Decrement the reference counts on all the objects MAP depends on. */ - for (i = 0; i < map->l_nsearchlist; ++i) + for (i = 0; i < nsearchlist; ++i) --list[i]->l_opencount; /* Check each element of the search list to see if all references to it are gone. */ - for (i = 0; i < map->l_nsearchlist; ++i) + for (i = 0; i < nsearchlist; ++i) { struct link_map *imap = list[i]; if (imap->l_opencount == 0 && imap->l_type == lt_loaded) diff --git a/elf/dl-open.c b/elf/dl-open.c index 3670657379..fa36fcb32e 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -169,8 +169,8 @@ dl_open_worker (void *a) } else { - if (_dl_global_scope_end + 2 - == _dl_global_scope + _dl_global_scope_alloc) + if (_dl_global_scope_end + 3 + > _dl_global_scope + _dl_global_scope_alloc) { /* Must extend the list. */ struct link_map **new = realloc (_dl_global_scope, |