summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2014-03-18 23:37:43 +0000
committerDmitry V. Levin <ldv@altlinux.org>2014-03-20 22:21:51 +0000
commit0160e161081c08480bb4fd63a292040c7611f6ec (patch)
tree97232fedb8036542c2af8e5715894e88222816e6
parenta07cfcc133f4adf5116a32b199c4230e022475da (diff)
downloadstrace-0160e161081c08480bb4fd63a292040c7611f6ec.tar.gz
strace-0160e161081c08480bb4fd63a292040c7611f6ec.tar.bz2
strace-0160e161081c08480bb4fd63a292040c7611f6ec.tar.xz
ARM EABI: disable OABI support by default
OABI is rarely used in ARM EABI systems nowadays, so disable its support by default. Add --enable-arm-oabi option to enable ARM OABI support. * configure.ac: New option --enable-arm-oabi. * syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
-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);