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]

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


On Thu, Oct 04, 2012 at 02:18:39PM -0700, Roland McGrath wrote:
> > 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?
> 
> Why not just set dl_nns in setup_vdso instead?

This patch works for me.  OK to install?

Thanks.


H.J.
---
 elf/setup-vdso.h  | 2 ++
 2 files changed, 5 insertions(+)

	* elf/setup-vdso.h (setup_vdso): Set GL(dl_nns) to 1 for vDSO
	if IS_IN_rtld isn't defined.

diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h
index 1b969a0..f8f348a 100644
--- a/elf/setup-vdso.h
+++ b/elf/setup-vdso.h
@@ -106,6 +106,8 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)),
       GL(dl_rtld_map).l_next = l;
       l->l_prev = &GL(dl_rtld_map);
       *first_preload = &l->l_next;
+# else
+      GL(dl_nns) = 1;
 # endif
 
       /* We have a prelinked DSO preloaded by the system.  */
-- 
1.7.11.4


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