svn commit: trunk/uClibc/libc/sysdeps/linux/arm

sjhill at uclibc.org sjhill at uclibc.org
Thu May 24 02:57:00 UTC 2007


Author: sjhill
Date: 2007-05-23 19:56:59 -0700 (Wed, 23 May 2007)
New Revision: 18676

Log:
Fix ARM EABI signal unwinding to accomodate signal frame layout between Linux kernel versions as reported by Joseph S. Myers on the mailing list. More information available at <http://www.uclibc.org/lists/uclibc/2007-May/017971.html> .


Modified:
   trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S	2007-05-23 15:41:48 UTC (rev 18675)
+++ trunk/uClibc/libc/sysdeps/linux/arm/sigrestorer.S	2007-05-24 02:56:59 UTC (rev 18676)
@@ -17,7 +17,8 @@
    02111-1307 USA.  */
 
 #include <sys/syscall.h>
-
+#include <linux/version.h>
+	
 /* If no SA_RESTORER function was specified by the application we use
    one of these.  This avoids the need for the kernel to synthesise a return
    instruction on the stack, which would involve expensive cache flushes.
@@ -29,15 +30,21 @@
 
    Start the unwind tables at least one instruction before the signal
    trampoline, because the unwinder will assume we are returning after
-   a call site.  */
+   a call site.
 
+   The signal frame layout changed in 2.6.18.  */
+
 .global __default_sa_restorer
 .type __default_sa_restorer,%function
 .align 2
 #ifdef __ARM_EABI__
 	.fnstart
 	.save {r0-r15}
+#if LINUX_VERSION_CODE >= 0x020612
+	.pad #32
+#else
 	.pad #12
+#endif
 	nop
 __default_sa_restorer:
 	mov	r7, $SYS_ify(sigreturn)
@@ -57,7 +64,11 @@
 #ifdef __ARM_EABI__
 	.fnstart
 	.save {r0-r15}
+#if LINUX_VERSION_CODE >= 0x020612
+	.pad #160
+#else
 	.pad #168
+#endif
 	nop
 __default_rt_sa_restorer:
 	mov	r7, $SYS_ify(rt_sigreturn)




More information about the uClibc-cvs mailing list