From patchwork Wed Nov 2 11:40:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 4894 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3633323E05 for ; Wed, 2 Nov 2011 11:40:36 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 24793A18610 for ; Wed, 2 Nov 2011 11:40:36 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so417152faa.11 for ; Wed, 02 Nov 2011 04:40:36 -0700 (PDT) Received: by 10.223.62.209 with SMTP id y17mr7962929fah.7.1320234036013; Wed, 02 Nov 2011 04:40:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.14.103 with SMTP id o7cs45223lac; Wed, 2 Nov 2011 04:40:35 -0700 (PDT) Received: by 10.227.197.197 with SMTP id el5mr4967952wbb.26.1320234031705; Wed, 02 Nov 2011 04:40:31 -0700 (PDT) Received: from mtagate1.uk.ibm.com (mtagate1.uk.ibm.com. [194.196.100.161]) by mx.google.com with ESMTPS id m11si1718240wbh.66.2011.11.02.04.40.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Nov 2011 04:40:31 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.161 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.161; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.161 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id pA2BeTHt020876 for ; Wed, 2 Nov 2011 11:40:29 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pA2BeSOH2531416 for ; Wed, 2 Nov 2011 11:40:28 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pA2BeSkK021341 for ; Wed, 2 Nov 2011 05:40:28 -0600 Received: from kiste.boeblingen.de.ibm.com (dyn-9-152-224-38.boeblingen.de.ibm.com [9.152.224.38]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pA2BeSVS021327; Wed, 2 Nov 2011 05:40:28 -0600 From: Ken Werner To: arun@sharma-home.net Cc: libunwind-devel@nongnu.org Subject: [PATCH] [ARM] Fix breakage when host != target Date: Wed, 2 Nov 2011 12:40:19 +0100 Message-Id: <1320234019-29005-2-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1320234019-29005-1-git-send-email-ken.werner@linaro.org> References: <1320234019-29005-1-git-send-email-ken.werner@linaro.org> Define the sigreturn syscall numbers instead of including on . Signed-off-by: Ken Werner --- 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 +#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. */