[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r4904 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2011-08-20 17:07:51 +0000 (Sat, 20 Aug 2011)
New Revision: 4904

Added:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-init-first.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
debian/patches/hurd-i386/submitted-init-first.diff: Fix stack switching compilation with newer gcc.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2011-08-20 07:36:12 UTC (rev 4903)
+++ glibc-package/trunk/debian/changelog	2011-08-20 17:07:51 UTC (rev 4904)
@@ -24,6 +24,8 @@
   [ Samuel Thibault ]
   * debian/patches/hurd-i386/submitted-ioctl-unsigned-size_t.diff: Add
     u?int{8,16,32,64} ioctl types.
+  * debian/patches/hurd-i386/submitted-init-first.diff: Fix stack switching
+    compilation with newer gcc.
 
   [ Steve Langasek ]
   * Install ld*.so to RTLDDIR (/lib64 or /lib), as appropriate, and convert

Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-init-first.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-init-first.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-init-first.diff	2011-08-20 17:07:51 UTC (rev 4904)
@@ -0,0 +1,29 @@
+http://www.cygwin.com/ml/libc-alpha/2011-07/msg00116.html
+
+2011-07-22  Ludovic Courtès  <ludo@gnu.org>
+
+       * sysdeps/mach/hurd/i386/init-first.c (init): Use
+       `__builtin_return_address' and `__builtin_frame_address' instead
+       of making assumptions about the location of the return address
+       relative to DATA.
+
+---
+ ChangeLog                           |    7 +++++++
+ sysdeps/mach/hurd/i386/init-first.c |    4 ++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
+index 7d93638..09af037 100644
+--- a/sysdeps/mach/hurd/i386/init-first.c
++++ b/sysdeps/mach/hurd/i386/init-first.c
+@@ -257,8 +257,8 @@ init (int *data)
+       /* Push the user code address on the top of the new stack.  It will
+ 	 be the return address for `init1'; we will jump there with NEWSP
+ 	 as the stack pointer.  */
+-      *--newsp = data[-1];
+-      ((void **) data)[-1] = switch_stacks;
++      *--newsp = __builtin_return_address (0);
++      * ((void **) __builtin_frame_address (0) + 1) = &switch_stacks;
+       /* Force NEWSP into %ecx and &init1 into %eax, which are not restored
+ 	 by function return.  */
+       asm volatile ("# a %0 c %1" : : "a" (newsp), "c" (&init1));

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2011-08-20 07:36:12 UTC (rev 4903)
+++ glibc-package/trunk/debian/patches/series	2011-08-20 17:07:51 UTC (rev 4904)
@@ -147,6 +147,7 @@
 hurd-i386/local-madvise_warn.diff
 hurd-i386/submitted-PTRACE_CONTINUE.diff
 hurd-i386/submitted-ldsodefs.h.diff
+hurd-i386/submitted-init-first.diff
 
 ia64/local-dlfptr.diff
 ia64/submitted-sysconf.diff


Reply to: