aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-11-27 15:07:42 -0800
committerRob Landley <rob@landley.net>2023-11-27 17:31:44 -0600
commitbf51dae965ff237007377edd93d44c4c682a7d26 (patch)
tree61d983ae677476c9a8cf0a635f98e2774b329976
parent10749f0422686db7261f7da35a53d17e0d5a41d6 (diff)
downloadtoybox-bf51dae965ff237007377edd93d44c4c682a7d26.tar.gz
strace: fix arm64 test.
We're not specifically looking for armv8; we want any aarch64. I've also changed the 32-bit arm test because (a) Linux doesn't support arm32 OABI any more, (b) it's clearer this way that 32-bit armv8 still belongs in this branch, and (c) __arm__ and __aarch64__ are the usual spellings everywhere. (Sure, the latter is ugly, but we have __i386__ rather than __x86__ one line later anyway! I still have to grep AOSP for mistaken uses of the non-existent __x86__ on a regular basis. And don't get me started on __riscv and __riscv_xlen!)
-rw-r--r--toys/pending/strace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/pending/strace.c b/toys/pending/strace.c
index 49ac2b69..24ec52a8 100644
--- a/toys/pending/strace.c
+++ b/toys/pending/strace.c
@@ -35,9 +35,9 @@ GLOBALS(
// Syscall args from https://man7.org/linux/man-pages/man2/syscall.2.html
// REG_ORDER is args 0-6, SYSCALL, RESULT
-#if defined(__ARM_EABI__)
+#if defined(__arm__)
static const char REG_ORDER[] = {0,1,2,3,4,5,7,0};
-#elif defined(__ARM_ARCH) && __ARM_ARCH == 8
+#elif defined(__aarch64__)
static const char REG_ORDER[] = {0,1,2,3,4,5,8,0};
#elif defined(__i386__)
// ebx,ecx,edx,esi,edi,ebp,orig_eax,eax