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.
This commit is contained in:
Дмитрий Левин 2014-03-18 23:37:43 +00:00
parent a07cfcc133
commit 0160e16108
2 changed files with 14 additions and 3 deletions

View File

@ -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],

View File

@ -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);