summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/sigrestorer.S
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-07-06 01:40:24 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-07-06 01:40:24 +0000
commit7b3606fe47d6a2f30ae023a99d049ea45bc0ff7f (patch)
tree13d6b66e851218dbde873739e675d45d12b87988 /libc/sysdeps/linux/arm/sigrestorer.S
parentbde6a2af56c378d585e1cbe58cc1643c9336f94a (diff)
Remove SA_ONSTACK handling for ARM based up on glibc code as submitted by Paul Brook <paul@codesourcery.com>.
Diffstat (limited to 'libc/sysdeps/linux/arm/sigrestorer.S')
-rw-r--r--libc/sysdeps/linux/arm/sigrestorer.S33
1 files changed, 32 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/arm/sigrestorer.S b/libc/sysdeps/linux/arm/sigrestorer.S
index bc175de6a..5b996ea83 100644
--- a/libc/sysdeps/linux/arm/sigrestorer.S
+++ b/libc/sysdeps/linux/arm/sigrestorer.S
@@ -20,13 +20,33 @@
/* 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. */
+ instruction on the stack, which would involve expensive cache flushes.
+
+ Nowadays (2.6 series, and somewhat earlier) the kernel uses a high page
+ for signal trampolines, so the cache flushes are not an issue. But since
+ we do not have a vDSO, continue to use these so that we can provide
+ unwind information.
+
+ Start the unwind tables at least one instruction before the signal
+ trampoline, because the unwinder will assume we are returning after
+ a call site. */
.global __default_sa_restorer
.type __default_sa_restorer,%function
.align 2
+#ifdef __ARM_EABI__
+ .fnstart
+ .save {r0-r15}
+ .pad #12
+ nop
+__default_sa_restorer:
+ mov r7, $SYS_ify(sigreturn)
+ swi 0x0
+ .fnend
+#else
__default_sa_restorer:
DO_CALL (sigreturn)
+#endif
#ifdef __NR_rt_sigreturn
@@ -34,7 +54,18 @@ __default_sa_restorer:
.global __default_rt_sa_restorer
.type __default_rt_sa_restorer,%function
.align 2
+#ifdef __ARM_EABI__
+ .fnstart
+ .save {r0-r15}
+ .pad #168
+ nop
+__default_rt_sa_restorer:
+ mov r7, $SYS_ify(rt_sigreturn)
+ swi 0x0
+ .fnend
+#else
__default_rt_sa_restorer:
DO_CALL (rt_sigreturn)
+#endif
#endif