about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-04-16 15:22:05 +0000
committerJakub Jelinek <jakub@redhat.com>2009-04-16 15:22:05 +0000
commit733ca93a45e09a3f4e04004943fe1051d4cedff5 (patch)
treed5e9bd4788dced95ed99116d1a6a74c220118d05
parentd0e81f10e56640c5d3a26997d8c31e2126aa4cea (diff)
downloadglibc-733ca93a45e09a3f4e04004943fe1051d4cedff5.tar.gz
glibc-733ca93a45e09a3f4e04004943fe1051d4cedff5.tar.xz
glibc-733ca93a45e09a3f4e04004943fe1051d4cedff5.zip
* elf/dl-open.c (_dl_open): Bump GL(dl_nns) to 1 if no libraries cvs/fedora-glibc-20090416T1610
are dlopened in statically linked program even for __LM_ID_CALLER.
2009-04-16  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-open.c (_dl_open): Bump GL(dl_nns) to 1 if no libraries
	are dlopened in statically linked program even for __LM_ID_CALLER.
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-open.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d7abd8a13c..902c3c7496 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf/dl-open.c (_dl_open): Bump GL(dl_nns) to 1 if no libraries
+	are dlopened in statically linked program even for __LM_ID_CALLER.
+
 2009-04-16  Ulrich Drepper  <drepper@redhat.com>
 
 	* resolv/res_send.c (send_dg): Don't switch into single-request
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 3799669cee..458cf0cd13 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -580,7 +580,8 @@ no more namespaces available for dlmopen()"));
     _dl_signal_error (EINVAL, file, NULL,
 		      N_("invalid target namespace in dlmopen()"));
 #ifndef SHARED
-  else if (nsid == LM_ID_BASE && GL(dl_ns)[LM_ID_BASE]._ns_loaded == NULL
+  else if ((nsid == LM_ID_BASE || nsid == __LM_ID_CALLER)
+	   && GL(dl_ns)[LM_ID_BASE]._ns_loaded == NULL
 	   && GL(dl_nns) == 0)
     GL(dl_nns) = 1;
 #endif