1 /* Copyright (C) 1999 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 #include <bits/arm_asm.h>
19 #include <sys/syscall.h>
20 #include <linux/version.h>
22 /* If no SA_RESTORER function was specified by the application we use
23 one of these. This avoids the need for the kernel to synthesise a return
24 instruction on the stack, which would involve expensive cache flushes.
26 Nowadays (2.6 series, and somewhat earlier) the kernel uses a high page
27 for signal trampolines, so the cache flushes are not an issue. But since
28 we do not have a vDSO, continue to use these so that we can provide
31 Start the unwind tables at least one instruction before the signal
32 trampoline, because the unwinder will assume we are returning after
35 The signal frame layout changed in 2.6.18. */
37 .global __default_sa_restorer
38 .type __default_sa_restorer,%function
46 #if LINUX_VERSION_CODE >= 0x020612
52 __default_sa_restorer:
53 mov r7, $SYS_ify(sigreturn)
57 __default_sa_restorer:
62 #ifdef __NR_rt_sigreturn
64 .global __default_rt_sa_restorer
65 .type __default_rt_sa_restorer,%function
73 #if LINUX_VERSION_CODE >= 0x020612
79 __default_rt_sa_restorer:
80 mov r7, $SYS_ify(rt_sigreturn)
84 __default_rt_sa_restorer:
85 DO_CALL (rt_sigreturn)