Update.
* elf/dl-lookup.c (add_dependency): Fix test to check whether dependency already exists. * elf/Makefile: Add testobj1 and testobj2 as dependencies of testobj6. * elf/loadtest.c (main): Add test at the end that everything is unloaded. * elf/dl-open.c (dl_open_worker): Fix typo in comment.
This commit is contained in:
parent
7d1231f116
commit
e30f2b9828
|
@ -1,5 +1,13 @@
|
||||||
2000-10-24 Ulrich Drepper <drepper@redhat.com>
|
2000-10-24 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-lookup.c (add_dependency): Fix test to check whether
|
||||||
|
dependency already exists.
|
||||||
|
* elf/Makefile: Add testobj1 and testobj2 as dependencies of testobj6.
|
||||||
|
* elf/loadtest.c (main): Add test at the end that everything is
|
||||||
|
unloaded.
|
||||||
|
|
||||||
|
* elf/dl-open.c (dl_open_worker): Fix typo in comment.
|
||||||
|
|
||||||
* elf/elf.h: Add even more IA-64 relocations.
|
* elf/elf.h: Add even more IA-64 relocations.
|
||||||
|
|
||||||
2000-10-24 Geoffrey Keating <geoffk@cygnus.com>
|
2000-10-24 Geoffrey Keating <geoffk@cygnus.com>
|
||||||
|
|
|
@ -246,7 +246,7 @@ $(objpfx)testobj2.so: $(objpfx)testobj1.so $(libdl)
|
||||||
$(objpfx)testobj3.so: $(libdl)
|
$(objpfx)testobj3.so: $(libdl)
|
||||||
$(objpfx)testobj4.so: $(libdl)
|
$(objpfx)testobj4.so: $(libdl)
|
||||||
$(objpfx)testobj5.so: $(libdl)
|
$(objpfx)testobj5.so: $(libdl)
|
||||||
$(objpfx)testobj6.so: $(libdl)
|
$(objpfx)testobj6.so: $(objpfx)testobj1.so $(objpfx)testobj2.so $(libdl)
|
||||||
$(objpfx)failobj.so: $(objpfx)testobj6.so
|
$(objpfx)failobj.so: $(objpfx)testobj6.so
|
||||||
$(objpfx)dep1.so: $(objpfx)dep2.so $(objpfx)dep4.so
|
$(objpfx)dep1.so: $(objpfx)dep2.so $(objpfx)dep4.so
|
||||||
$(objpfx)dep2.so: $(objpfx)dep3.so $(objpfx)dep4.so
|
$(objpfx)dep2.so: $(objpfx)dep3.so $(objpfx)dep4.so
|
||||||
|
|
|
@ -97,14 +97,13 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
|
||||||
|
|
||||||
/* Determine whether UNDEF_MAP already has a reference to MAP. First
|
/* Determine whether UNDEF_MAP already has a reference to MAP. First
|
||||||
look in the normal dependencies. */
|
look in the normal dependencies. */
|
||||||
list = undef_map->l_searchlist.r_list;
|
list = undef_map->l_initfini;
|
||||||
act = undef_map->l_searchlist.r_nlist;
|
|
||||||
|
|
||||||
for (i = 0; i < act; ++i)
|
for (i = 0; list[i] != NULL; ++i)
|
||||||
if (list[i] == map)
|
if (list[i] == map)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (__builtin_expect (i == act, 1))
|
if (__builtin_expect (list[i] == NULL, 1))
|
||||||
{
|
{
|
||||||
/* No normal dependency. See whether we already had to add it
|
/* No normal dependency. See whether we already had to add it
|
||||||
to the special list of dynamic dependencies. */
|
to the special list of dynamic dependencies. */
|
||||||
|
|
|
@ -255,7 +255,7 @@ dl_open_worker (void *a)
|
||||||
"\n\n", NULL);
|
"\n\n", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the user requested the object t be in the global namespace
|
/* If the user requested the object to be in the global namespace
|
||||||
but it is not so far, add it now. */
|
but it is not so far, add it now. */
|
||||||
if ((mode & RTLD_GLOBAL) && new->l_global == 0)
|
if ((mode & RTLD_GLOBAL) && new->l_global == 0)
|
||||||
(void) add_to_global (new);
|
(void) add_to_global (new);
|
||||||
|
|
|
@ -148,15 +148,27 @@ main (int argc, char *argv[])
|
||||||
/* Unload all loaded modules. */
|
/* Unload all loaded modules. */
|
||||||
for (count = 0; count < NOBJS; ++count)
|
for (count = 0; count < NOBJS; ++count)
|
||||||
if (testobjs[count].handle != NULL)
|
if (testobjs[count].handle != NULL)
|
||||||
{ printf ("\nclose: %s: l_initfini = %p, l_versions = %p\n",
|
{
|
||||||
testobjs[count].name,
|
printf ("\nclose: %s: l_initfini = %p, l_versions = %p\n",
|
||||||
((struct link_map*)testobjs[count].handle)->l_initfini,
|
testobjs[count].name,
|
||||||
((struct link_map*)testobjs[count].handle)->l_versions);
|
((struct link_map*)testobjs[count].handle)->l_initfini,
|
||||||
if (dlclose (testobjs[count].handle) != 0)
|
((struct link_map*)testobjs[count].handle)->l_versions);
|
||||||
{
|
|
||||||
printf ("failed to close %s\n", testobjs[count].name);
|
if (dlclose (testobjs[count].handle) != 0)
|
||||||
result = 1;
|
{
|
||||||
} }
|
printf ("failed to close %s\n", testobjs[count].name);
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check whether all files are unloaded. */
|
||||||
|
for (map = _r_debug.r_map; map != NULL; map = map->l_next)
|
||||||
|
if (map->l_type == lt_loaded)
|
||||||
|
{
|
||||||
|
printf ("name = \"%s\", opencount = %d\n",
|
||||||
|
map->l_name, (int) map->l_opencount);
|
||||||
|
result = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue