This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/4] Allow _ns_loaded == dl_sysinfo_map in libc.a


With vDSO support in libc.a, we may have

GL(dl_ns)[LM_ID_BASE]._ns_loaded == GLRO(dl_sysinfo_map)

This patch allows it in libc.a.  OK to install?

Thanks.


H.J.
---
 ChangeLog.pr14557 | 3 +++
 elf/dl-open.c     | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog.pr14557 b/ChangeLog.pr14557
index b98665c..c67bfdc 100644
--- a/ChangeLog.pr14557
+++ b/ChangeLog.pr14557
@@ -1,5 +1,8 @@
 2012-09-28  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* elf/dl-open.c (_dl_open): Also allow _ns_loaded == dl_sysinfo_map
+	if SHARED isn't defined.
+
 	[BZ #14557]
 	* elf/dl-support.c: Include <assert.h>.
 	(_dl_sysinfo_map): New.
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 5149e57..af46106 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -632,7 +632,8 @@ no more namespaces available for dlmopen()"));
 		      N_("invalid target namespace in dlmopen()"));
 #ifndef SHARED
   else if ((nsid == LM_ID_BASE || nsid == __LM_ID_CALLER)
-	   && GL(dl_ns)[LM_ID_BASE]._ns_loaded == NULL
+	   && (GL(dl_ns)[LM_ID_BASE]._ns_loaded == NULL
+	       || GL(dl_ns)[LM_ID_BASE]._ns_loaded == GLRO(dl_sysinfo_map))
 	   && GL(dl_nns) == 0)
     GL(dl_nns) = 1;
 #endif
-- 
1.7.11.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]