[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH] [ARM] Fix breakage when host != target
From: |
Ken Werner |
Subject: |
[Libunwind-devel] [PATCH] [ARM] Fix breakage when host != target |
Date: |
Wed, 2 Nov 2011 12:40:19 +0100 |
Define the sigreturn syscall numbers instead of including on <sys/syscall.h>.
Signed-off-by: Ken Werner <address@hidden>
---
src/arm/Gis_signal_frame.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/arm/Gis_signal_frame.c b/src/arm/Gis_signal_frame.c
index 284289f..e2e8cd6 100644
--- a/src/arm/Gis_signal_frame.c
+++ b/src/arm/Gis_signal_frame.c
@@ -27,20 +27,24 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#include "unwind_i.h"
#ifdef __linux__
-#include <sys/syscall.h>
+#define ARM_NR_sigreturn 119
+#define ARM_NR_rt_sigreturn 173
+#define ARM_NR_OABI_SYSCALL_BASE 0x900000
/* ARM EABI sigreturn (the syscall number is loaded into r7) */
-#define MOV_R7_SIGRETURN (0xe3a07000UL | __NR_sigreturn)
-#define MOV_R7_RT_SIGRETURN (0xe3a07000UL | __NR_rt_sigreturn)
+#define MOV_R7_SIGRETURN (0xe3a07000UL | ARM_NR_sigreturn)
+#define MOV_R7_RT_SIGRETURN (0xe3a07000UL | ARM_NR_rt_sigreturn)
/* ARM OABI sigreturn (using SWI) */
-#define ARM_SIGRETURN (0xef000000UL |(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE))
-#define ARM_RT_SIGRETURN (0xef000000UL
|(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE))
+#define ARM_SIGRETURN \
+ (0xef000000UL | ARM_NR_sigreturn | ARM_NR_OABI_SYSCALL_BASE)
+#define ARM_RT_SIGRETURN \
+ (0xef000000UL | ARM_NR_rt_sigreturn | ARM_NR_OABI_SYSCALL_BASE)
/* Thumb sigreturn (two insns, syscall number is loaded into r7) */
-#define THUMB_SIGRETURN (0xdf00UL << 16 | 0x2700 | __NR_sigreturn)
-#define THUMB_RT_SIGRETURN (0xdf00UL << 16 | 0x2700 | __NR_rt_sigreturn)
-#endif
+#define THUMB_SIGRETURN (0xdf00UL << 16 | 0x2700 | ARM_NR_sigreturn)
+#define THUMB_RT_SIGRETURN (0xdf00UL << 16 | 0x2700 | ARM_NR_rt_sigreturn)
+#endif /* __linux__ */
/* Returns 1 in case of a non-RT signal frame and 2 in case of a RT signal
frame. */
--
1.7.5.4