Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
ARM EABI: disable OABI support by default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ldv-alt committed Mar 20, 2014
1 parent a07cfcc commit 0160e16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
5 changes: 2 additions & 3 deletions syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 0160e16

Please sign in to comment.