[glibc] - Always mark vDSO as used (#758888)

Jeffrey Law law at fedoraproject.org
Wed Feb 29 19:51:00 UTC 2012


commit 978e71e3df84d53c6131cabd8e4632723c7e2fc4
Author: Jeff Law <law at redhat.com>
Date:   Wed Feb 29 12:50:51 2012 -0700

      - Always mark vDSO as used (#758888)

 glibc-rh758888.patch |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 glibc.spec           |    1 +
 2 files changed, 53 insertions(+), 0 deletions(-)
---
diff --git a/glibc-rh758888.patch b/glibc-rh758888.patch
new file mode 100644
index 0000000..ccf9715
--- /dev/null
+++ b/glibc-rh758888.patch
@@ -0,0 +1,52 @@
+commit 1f393a11f65dcaa1952bdcaf0317a65a5f8aff9d
+Author: Marek Polacek <polacek at redhat.com>
+Date:   Wed Feb 29 15:28:38 2012 +0100
+
+    Always set l_used for vDSO.
+
+2012-02-29  Marek Polacek  <polacek at redhat.com>
+
+	[BZ #13706]
+	* elf/rtld.c (dl_main): Always set l_used to 1 for vDSO.
+	* elf/Makefile: Add rules to run tst-unused-dep.out.
+
+diff --git a/elf/Makefile b/elf/Makefile
+index 8234ba7..25ffc57 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -1203,3 +1203,14 @@ $(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
+ $(objpfx)tst-relsort1mod2.so: $(libm)
+ $(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
+ 			   $(objpfx)tst-relsort1mod2.so
++
++tests: $(objpfx)tst-unused-dep.out
++
++$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
++	LD_TRACE_LOADED_OBJECTS=1 \
++	LD_DEBUG=unused \
++	LD_PRELOAD= \
++	$(elf-objpfx)${rtld-installed-name} \
++	  --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
++	  $< > $@
++	cmp $@ /dev/null > /dev/null
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 2e4f97f..3e15447 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1,5 +1,5 @@
+ /* Run time dynamic linker.
+-   Copyright (C) 1995-2010, 2011 Free Software Foundation, Inc.
++   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -1375,6 +1375,9 @@ of this helper program; chances are you did not intend to run this program.\n\
+ 	  _dl_setup_hash (l);
+ 	  l->l_relocated = 1;
+ 
++	  /* The vDSO is always used.  */
++	  l->l_used = 1;
++
+ 	  /* Initialize l_local_scope to contain just this map.  This allows
+ 	     the use of dl_lookup_symbol_x to resolve symbols within the vdso.
+ 	     So we create a single entry list pointing to l_real as its only
diff --git a/glibc.spec b/glibc.spec
index 4f7b061..5399069 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -1220,6 +1220,7 @@ rm -f *.filelist*
 %changelog
 * Wed Feb 29 2012 Jeff Law <law at redhat.com> - 2.15-25
   - Fix out of bounds memory access in resolver (#798471)
+  - Always mark vDSO as used (#758888)
 
 * Fri Feb 24 2012 Jeff Law <law at redhat.com> - 2.15-24
   - Fix bogus underflow (#760935)


More information about the scm-commits mailing list