summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--syscall.c5
2 files changed, 14 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 39832ef..11d9be8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,18 @@ AM_CONDITIONAL([X32], [test x$arch = xx32])
AC_INCLUDEDIR
+AC_ARG_ENABLE([arm-oabi],
+ [AS_HELP_STRING([--enable-arm-oabi],
+ [enable OABI support on ARM EABI])],
+ [], [enable_arm_oabi=no])
+case "$enable_arm_oabi" in
+ yes) enable_arm_oabi=1 ;;
+ no) enable_arm_oabi=0 ;;
+ *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;;
+esac
+AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
+ [Define to 1 if you want OABI support on ARM EABI.])
+
gl_WARN_ADD([-Wall])
gl_WARN_ADD([-Wwrite-strings])
AC_ARG_ENABLE([gcc-Werror],
diff --git a/syscall.c b/syscall.c
index 5c4b42e..0a4e15d 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1360,8 +1360,7 @@ get_scno(struct tcb *tcp)
}
/* Note: we support only 32-bit CPUs, not 26-bit */
-# ifndef STRACE_KNOWS_ONLY_EABI
-# warning STRACE_KNOWS_ONLY_EABI not set, will PTRACE_PEEKTEXT on every syscall (slower tracing)
+# if !defined(__ARM_EABI__) || ENABLE_ARM_OABI
if (arm_regs.ARM_cpsr & 0x20)
/* Thumb mode */
goto scno_in_r7;
@@ -1385,7 +1384,7 @@ get_scno(struct tcb *tcp)
scno_in_r7:
scno = arm_regs.ARM_r7;
}
-# else
+# else /* __ARM_EABI__ || !ENABLE_ARM_OABI */
scno = arm_regs.ARM_r7;
# endif
scno = shuffle_scno(scno);