mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
* elf/dl-close.c: Handle failed loads which would have gone in the global scope correctly. * elf/testobj1.c: Include stdlib.h to get NULL defined. * elf/testobj2.c: Likewise. * elf/testobj3.c: Likewise. * elf/testobj4.c: Likewise. * elf/testobj5.c: Likewise. * iconvdata/sami-ws2.c: New file.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@ -1,9 +1,18 @@
|
|||||||
1999-01-20 Ulrich Drepper <drepper@cygnus.com>
|
1999-01-20 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* elf/dl-close.c: Handle failed loads which would have gone in the
|
||||||
|
global scope correctly.
|
||||||
|
|
||||||
|
* elf/testobj1.c: Include stdlib.h to get NULL defined.
|
||||||
|
* elf/testobj2.c: Likewise.
|
||||||
|
* elf/testobj3.c: Likewise.
|
||||||
|
* elf/testobj4.c: Likewise.
|
||||||
|
* elf/testobj5.c: Likewise.
|
||||||
|
|
||||||
* iconvdata/Makefile (modules): Add SAMI-WS2 and ISO-IR-197.
|
* iconvdata/Makefile (modules): Add SAMI-WS2 and ISO-IR-197.
|
||||||
* iconvdata/gconv-modules: Add entries for above charsets.
|
* iconvdata/gconv-modules: Add entries for above charsets.
|
||||||
* iconvdata/iso-ir-197.c: New file.
|
* iconvdata/iso-ir-197.c: New file.
|
||||||
* iconvdata/same-ws2.c: New file.
|
* iconvdata/sami-ws2.c: New file.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/vfork.c: Once again use generic version.
|
* sysdeps/unix/sysv/linux/vfork.c: Once again use generic version.
|
||||||
|
|
||||||
|
@ -106,29 +106,35 @@ _dl_close (struct link_map *map)
|
|||||||
unsigned int cnt = _dl_main_searchlist->r_nlist;
|
unsigned int cnt = _dl_main_searchlist->r_nlist;
|
||||||
|
|
||||||
do
|
do
|
||||||
--cnt;
|
if (--cnt < 0)
|
||||||
|
break;
|
||||||
while (_dl_main_searchlist->r_list[cnt] != imap);
|
while (_dl_main_searchlist->r_list[cnt] != imap);
|
||||||
|
|
||||||
|
if (cnt >= 0)
|
||||||
|
{
|
||||||
|
/* The object was already correctly registered. */
|
||||||
while (++cnt < _dl_main_searchlist->r_nlist)
|
while (++cnt < _dl_main_searchlist->r_nlist)
|
||||||
_dl_main_searchlist->r_list[cnt - 1]
|
_dl_main_searchlist->r_list[cnt - 1]
|
||||||
= _dl_main_searchlist->r_list[cnt];
|
= _dl_main_searchlist->r_list[cnt];
|
||||||
|
|
||||||
--_dl_main_searchlist->r_nlist;
|
--_dl_main_searchlist->r_nlist;
|
||||||
if (_dl_main_searchlist->r_nlist
|
}
|
||||||
== _dl_initial_searchlist.r_nlist)
|
else
|
||||||
{
|
{
|
||||||
/* All object dynamically loaded by the program are
|
/* This can happen if loading was interrupted by something
|
||||||
unloaded. Free the memory allocated for the global
|
like a missing symbol in the newly loaded objects. In
|
||||||
scope variable. */
|
this case the object is already marked as global but
|
||||||
struct link_map **old = _dl_main_searchlist->r_list;
|
`r_nlist' does not count it in. The pointer is in the
|
||||||
|
`r_list' array so we keep searching in the other
|
||||||
/* Put the old map in. */
|
direction. */
|
||||||
_dl_main_searchlist->r_list = _dl_initial_searchlist.r_list;
|
cnt = _dl_main_searchlist->r_nlist;
|
||||||
/* Signal that the old map is used. */
|
while (_dl_main_searchlist->r_list[cnt] != imap)
|
||||||
_dl_global_scope_alloc = 0;
|
{
|
||||||
|
++cnt;
|
||||||
/* Now free the old map. */
|
/* Note that if _dl_global_scope_alloc is zero we
|
||||||
free (old);
|
should never come here in the first place. */
|
||||||
|
assert (cnt < _dl_global_scope_alloc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,6 +192,22 @@ _dl_close (struct link_map *map)
|
|||||||
|
|
||||||
free (list);
|
free (list);
|
||||||
|
|
||||||
|
if (_dl_global_scope_alloc != 0
|
||||||
|
&& _dl_main_searchlist->r_nlist == _dl_initial_searchlist.r_nlist)
|
||||||
|
{
|
||||||
|
/* All object dynamically loaded by the program are unloaded. Free
|
||||||
|
the memory allocated for the global scope variable. */
|
||||||
|
struct link_map **old = _dl_main_searchlist->r_list;
|
||||||
|
|
||||||
|
/* Put the old map in. */
|
||||||
|
_dl_main_searchlist->r_list = _dl_initial_searchlist.r_list;
|
||||||
|
/* Signal that the original map is used. */
|
||||||
|
_dl_global_scope_alloc = 0;
|
||||||
|
|
||||||
|
/* Now free the old map. */
|
||||||
|
free (old);
|
||||||
|
}
|
||||||
|
|
||||||
/* Notify the debugger those objects are finalized and gone. */
|
/* Notify the debugger those objects are finalized and gone. */
|
||||||
_r_debug.r_state = RT_CONSISTENT;
|
_r_debug.r_state = RT_CONSISTENT;
|
||||||
_dl_debug_state ();
|
_dl_debug_state ();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
obj1func1 (int a __attribute__ ((unused)))
|
obj1func1 (int a __attribute__ ((unused)))
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
obj2func1 (int a __attribute__ ((unused)))
|
obj2func1 (int a __attribute__ ((unused)))
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
obj3func1 (int a __attribute__ ((unused)))
|
obj3func1 (int a __attribute__ ((unused)))
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
obj4func1 (int a __attribute__ ((unused)))
|
obj4func1 (int a __attribute__ ((unused)))
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
obj5func1 (int a __attribute__ ((unused)))
|
obj5func1 (int a __attribute__ ((unused)))
|
||||||
|
Reference in New Issue
Block a user