Author: aurel32
Date: 2011-02-26 12:03:34 +0000 (Sat, 26 Feb 2011)
New Revision: 4533

Added:
   glibc-package/branches/eglibc-2.13/debian/patches/any/cvs-rtld-prelink.diff
Modified:
   glibc-package/branches/eglibc-2.13/debian/changelog
   glibc-package/branches/eglibc-2.13/debian/patches/series
Log:
  * Add patches/any/cvs-rtld-prelink.diff to fix segfault on prelinked
    binaries.



Modified: glibc-package/branches/eglibc-2.13/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/changelog 2011-02-26 11:18:34 UTC 
(rev 4532)
+++ glibc-package/branches/eglibc-2.13/debian/changelog 2011-02-26 12:03:34 UTC 
(rev 4533)
@@ -123,6 +123,8 @@
     in dlopen().  Closes: #195888.
   * Add patches/any/cvs-dl-missing-deps.diff to output an early error
     when dependencies are missing.  Closes: #612792.
+  * Add patches/any/cvs-rtld-prelink.diff to fix segfault on prelinked
+    binaries.
 
   [ Samuel Thibault ]
   * Add patches/any/cvs-glro_dl_debug_mask.diff to fix build without

Added: 
glibc-package/branches/eglibc-2.13/debian/patches/any/cvs-rtld-prelink.diff
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/any/cvs-rtld-prelink.diff 
                        (rev 0)
+++ glibc-package/branches/eglibc-2.13/debian/patches/any/cvs-rtld-prelink.diff 
2011-02-26 12:03:34 UTC (rev 4533)
@@ -0,0 +1,42 @@
+2010-09-28  Andreas Schwab  <sch...@redhat.com>
+           Ulrich Drepper  <drep...@gmail.com>
+
+       [BZ #12489]
+       * elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
+       before performing relro protection.  At old place add assertion
+       to make sure nothing changed.
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 8510380..174954b 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1,5 +1,5 @@
+ /* Run time dynamic linker.
+-   Copyright (C) 1995-2006, 2007, 2008, 2009, 2010 Free Software Foundation, 
Inc.
++   Copyright (C) 1995-2010, 2011 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
+@@ -2179,6 +2179,10 @@ ERROR: ld.so: object '%s' cannot be loaded as audit 
interface: %s; ignored.\n",
+      we need it in the memory handling later.  */
+   GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
+ 
++  /* Remember the last search directory added at startup, now that
++     malloc will no longer be the one from dl-minimal.c.  */
++  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
++
+   if (prelinked)
+     {
+       if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
+@@ -2298,9 +2302,8 @@ ERROR: ld.so: object '%s' cannot be loaded as audit 
interface: %s; ignored.\n",
+                         lossage);
+     }
+ 
+-  /* Remember the last search directory added at startup, now that
+-     malloc will no longer be the one from dl-minimal.c.  */
+-  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
++  /* Make sure no new search directories have been added.  */
++  assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
+ 
+   if (! prelinked && rtld_multiple_ref)
+     {

Modified: glibc-package/branches/eglibc-2.13/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/series    2011-02-26 
11:18:34 UTC (rev 4532)
+++ glibc-package/branches/eglibc-2.13/debian/patches/series    2011-02-26 
12:03:34 UTC (rev 4533)
@@ -220,3 +220,4 @@
 any/local-relro-mprotect.diff
 any/cvs-dlopen_memory_leak.diff
 any/cvs-dl-missing-deps.diff
+any/cvs-rtld-prelink.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1ptisd-0007em...@alioth.debian.org

Reply via email to