about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-09-08 17:45:32 +0000
committerUlrich Drepper <drepper@redhat.com>2001-09-08 17:45:32 +0000
commit84aafa9199e43623f55800898f9364e839525cdf (patch)
tree767e4b24a42ee58d7f7f69e5471464f28d4a0398 /elf
parentc4bb124a75b23d1a82cee232005dc7e8c43a4276 (diff)
downloadglibc-84aafa9199e43623f55800898f9364e839525cdf.tar.gz
glibc-84aafa9199e43623f55800898f9364e839525cdf.tar.xz
glibc-84aafa9199e43623f55800898f9364e839525cdf.zip
Update.
2001-09-07  Tom Rix  <trix@redhat.com>

	* sysdeps/unix/sysv/aix/sysv_termio.h: New file.

2001-08-26  Tom Rix  <trix@redhat.com>

	* sysdeps/unix/sysv/aix/Makefile (aix-syscalls.o): More linker
	command line options.
	* sysdeps/unix/sysv/aix/start.s: New file, rework of start.c
	* sysdeps/unix/sysv/aix/start.c: Removed.
	* sysdeps/unix/sysv/aix/start-libc.c: New file.
	* sysdeps/unix/sysv/aix/init-first.c: New file.
	* sysdeps/unix/sysv/aix/fcntl.c: Alias __libc_fcntl to __fcntl.

2001-09-08  Ben Collins  <bcollins@debian.org>

	* sysdeps/arm/dl-machine.h: Fix usage of new _dl_signal_error() format.
	* sysdeps/generic/dl-machine.h: Likewise.
	* sysdeps/hppa/dl-fptr.c: Likewise.
	* sysdeps/ia64/dl-fptr.c: Likewise.
	* sysdeps/mach/hurd/dl-sysdep.c: Likewise.
	* sysdeps/mips/dl-machine.h: Likewise.
	* sysdeps/mips/mips64/dl-machine.h: Likewise.
	* sysdeps/powerpc/dl-machine.c: Likewise.

2001-09-07  Ben Collins  <bcollins@debian.org>

	* sysdeps/sparc/sparc32/dl-machine.h: Fix typo.

	* sysdeps/hppa/dl-lookupcfg.h: Forward declare struct link_map.

	* elf/dl-lookup.c (add_dependency): Bump l_opencount of all
	dependencies if necessary.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-lookup.c11
-rw-r--r--elf/reldep2.c4
2 files changed, 11 insertions, 4 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 26c839caa7..5fa50fc457 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -151,8 +151,15 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
       if (__builtin_expect (act < undef_map->l_reldepsmax, 1))
 	undef_map->l_reldeps[undef_map->l_reldepsact++] = map;
 
-      /* And increment the counter in the referenced object.  */
-      ++map->l_opencount;
+      if (map->l_searchlist.r_list != NULL)
+	/* And increment the counter in the referenced object.  */
+	++map->l_opencount;
+      else
+	/* We have to bump the counts for all dependencies since so far
+	   this object was only a normal or transitive dependency.
+	   Now it might be closed with _dl_close() directly.  */
+	for (list = map->l_initfini; *list != NULL; ++list)
+	  ++(*list)->l_opencount;
 
       /* Display information if we are debugging.  */
       if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
diff --git a/elf/reldep2.c b/elf/reldep2.c
index aadb0cbfdb..ba5ab222f9 100644
--- a/elf/reldep2.c
+++ b/elf/reldep2.c
@@ -53,8 +53,8 @@ main (void)
       exit (1);
     }
 
-  /* Now close the first object.  If must still be around since we have
-     a implicit dependency.  */
+  /* Now close the first object.  It must still be around since we have
+     an implicit dependency.  */
   if (dlclose (h1) != 0)
     {
       printf ("closing h1 failed: %s\n", dlerror ());