about summary refs log tree commit diff
path: root/elf/dl-open.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-10-01 00:14:14 +0000
committerUlrich Drepper <drepper@redhat.com>2001-10-01 00:14:14 +0000
commitc47e78b10f6b18532951fb6f6b0c5a2e8afcf88e (patch)
tree7e90f41294db2af2fa17e3ad20b2f6683a83d942 /elf/dl-open.c
parentddb96b7db11b13f4715e8e999f66c2fd5b48a93a (diff)
downloadglibc-c47e78b10f6b18532951fb6f6b0c5a2e8afcf88e.tar.gz
glibc-c47e78b10f6b18532951fb6f6b0c5a2e8afcf88e.tar.xz
glibc-c47e78b10f6b18532951fb6f6b0c5a2e8afcf88e.zip
Update.
2001-09-29  Jes Sorensen  <jes@trained-monkey.org>

	* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext):
	Add sc_loadrs and sc_rbs_bas to match current kernel.

2001-09-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.

	* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Fix erfc(-inf).

2001-09-27  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-open.c (dl_open_worker): If l_opencount of freshly loaded
	object has been bumped because of relocation dependency, avoid
	duplicates in l_scope.
	(show_scope): Fix typos.
	* elf/Makefile: Add rules to build and run reldep6.
	* elf/reldep6.c: New file.
	* elf/reldep6mod0.c: New file.
	* elf/reldep6mod1.c: New file.
	* elf/reldep6mod2.c: New file.
	* elf/reldep6mod3.c: New file.
	* elf/reldep6mod4.c: New file.

2001-09-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Call
	sparc64_fixup_plt.
	(sparc64_fixup_plt): Moved from elf_machine_fixup_plt. Optimize
	near jumps and 0xfffff800XXXXXXXX target addresses, no thread safety
	for non-lazy binding. Fix .plt[32768+] handling.
	(elf_machine_plt_value): Don't add addend.
	(elf_machine_rela): Call sparc64_fixup_plt instead of
	elf_machine_fixup_plt.
	(elf_machine_runtime_setup, TRAMPOLINE_TEMPLATE): Optimize for
	dynamic linker at 0xfffff800XXXXXXXX.

	* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r--elf/dl-open.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 3f2631a98b..c061cdeb0e 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -312,10 +312,20 @@ dl_open_worker (void *a)
 
 	while (*runp != NULL)
 	  {
+	    /* This can happen if imap was just loaded, but during
+	       relocation had l_opencount bumped because of relocation
+	       dependency.  Avoid duplicates in l_scope.  */
+	    if (__builtin_expect (*runp == &new->l_searchlist, 0))
+	      break;
+
 	    ++cnt;
 	    ++runp;
 	  }
 
+	if (*runp != NULL)
+	  /* Avoid duplicates.  */
+	  continue;
+
 	if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0))
 	  {
 	    /* The 'r_scope' array is too small.  Allocate a new one
@@ -478,11 +488,11 @@ show_scope (struct link_map *new)
 
       for (cnt = 0; cnt < new->l_scope[scope_cnt]->r_nlist; ++cnt)
 	if (*new->l_scope[scope_cnt]->r_list[cnt]->l_name)
-	  _dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name)
+	  _dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name);
 	else
-	  _dl_printf (" <main>", NULL);
+	  _dl_printf (" <main>");
 
-      _dl_printf ("\n", NULL);
+      _dl_printf ("\n");
     }
 }
 #endif