summary refs log tree commit diff
path: root/elf/loadtest.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-25 04:00:08 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-25 04:00:08 +0000
commite30f2b9828ddff95b687b9818787ab2a99570f11 (patch)
tree0f7d70d62ed062356f97e114a4762d44b0197d14 /elf/loadtest.c
parent7d1231f116a3e3019c4ea184e043fb881ba0b207 (diff)
downloadglibc-e30f2b9828ddff95b687b9818787ab2a99570f11.tar.gz
glibc-e30f2b9828ddff95b687b9818787ab2a99570f11.tar.xz
glibc-e30f2b9828ddff95b687b9818787ab2a99570f11.zip
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.
Diffstat (limited to 'elf/loadtest.c')
-rw-r--r--elf/loadtest.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/elf/loadtest.c b/elf/loadtest.c
index 25b27005f1..7cbe55bcd7 100644
--- a/elf/loadtest.c
+++ b/elf/loadtest.c
@@ -148,15 +148,27 @@ main (int argc, char *argv[])
   /* Unload all loaded modules.  */
   for (count = 0; count < NOBJS; ++count)
     if (testobjs[count].handle != NULL)
-{	  printf ("\nclose: %s: l_initfini = %p, l_versions = %p\n",
-		  testobjs[count].name,
-		  ((struct link_map*)testobjs[count].handle)->l_initfini,
-		  ((struct link_map*)testobjs[count].handle)->l_versions);
-      if (dlclose (testobjs[count].handle) != 0)
-	{
-	  printf ("failed to close %s\n", testobjs[count].name);
-	  result = 1;
-}	}
+      {
+	printf ("\nclose: %s: l_initfini = %p, l_versions = %p\n",
+		testobjs[count].name,
+		((struct link_map*)testobjs[count].handle)->l_initfini,
+		((struct link_map*)testobjs[count].handle)->l_versions);
+
+	if (dlclose (testobjs[count].handle) != 0)
+	  {
+	    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;
 }