linux/powerpc64/syscallent.h \
linux/powerpc64/syscallent1.h \
linux/powerpc64/userent.h \
+ linux/powerpc64le/arch_defs_.h \
+ linux/powerpc64le/arch_regs.c \
+ linux/powerpc64le/arch_rt_sigframe.c \
+ linux/powerpc64le/errnoent.h \
+ linux/powerpc64le/get_error.c \
+ linux/powerpc64le/get_scno.c \
+ linux/powerpc64le/get_syscall_args.c \
+ linux/powerpc64le/ioctls_arch0.h \
+ linux/powerpc64le/ioctls_inc0.h \
+ linux/powerpc64le/raw_syscall.h \
+ linux/powerpc64le/rt_sigframe.h \
+ linux/powerpc64le/set_error.c \
+ linux/powerpc64le/set_scno.c \
+ linux/powerpc64le/syscallent.h \
+ linux/powerpc64le/userent.h \
linux/ptrace_pokeuser.c \
linux/raw_syscall.h \
linux/riscv/arch_defs_.h \
AC_DEFINE([MANPAGE_DATE], "[manpage_date]", [Date])
AC_SUBST([MANPAGE_DATE], [manpage_date])
+AC_C_BIGENDIAN
+
AC_MSG_CHECKING([for supported architecture])
arch_m32=
arch_mx32=
# error 32 bit
#endif], [], arch=powerpc64, arch=powerpc)
if test "$arch" = "powerpc64"; then
- arch_m32=powerpc
- AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.])
+ # $ac_cv_c_bigendian is defined by AC_C_BIGENDIAN
+ case "$ac_cv_c_bigendian" in
+ no)
+ arch=powerpc64le
+ AC_DEFINE([POWERPC64LE], 1,
+ [Define for the little endian PowerPC64 architecture.])
+ ;;
+ *)
+ arch_m32=powerpc
+ AC_DEFINE([POWERPC64], 1,
+ [Define for the big endian PowerPC64 architecture.])
+ ;;
+ esac
fi
;;
riscv*)
AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
[Define to 1 if you want OABI support on ARM EABI.])
-AC_C_BIGENDIAN
AC_C_TYPEOF
AC_TYPE_UID_T
--- /dev/null
+/*
+ * Copyright (c) 2019 The strace developers.
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#define HAVE_ARCH_OLD_SELECT 1
+#define HAVE_ARCH_DEDICATED_ERR_REG 1
--- /dev/null
+#include "../powerpc/arch_regs.c"
--- /dev/null
+/*
+ * Copyright (c) 2017-2018 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+FUNC_GET_RT_SIGFRAME_ADDR
+{
+ kernel_ulong_t sp;
+ return get_stack_pointer(tcp, &sp) ? sp : 0;
+}
--- /dev/null
+#include "../powerpc64/errnoent.h"
--- /dev/null
+#include "../powerpc64/get_error.c"
--- /dev/null
+/*
+ * Copyright (c) 2015-2018 The strace developers.
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+/* Return codes: 1 - ok, 0 - ignore, other - error. */
+static int
+arch_get_scno(struct tcb *tcp)
+{
+ tcp->scno = ppc_regs.gpr[0];
+ return 1;
+}
--- /dev/null
+#include "../powerpc64/get_syscall_args.c"
--- /dev/null
+#include "../powerpc64/ioctls_arch0.h"
--- /dev/null
+#include "../powerpc64/ioctls_inc0.h"
--- /dev/null
+#include "../powerpc64/raw_syscall.h"
--- /dev/null
+#include "../powerpc64/rt_sigframe.h"
--- /dev/null
+#include "../powerpc64/set_error.c"
--- /dev/null
+#include "../powerpc64/set_scno.c"
--- /dev/null
+#include "../powerpc64/syscallent.h"
--- /dev/null
+#include "../powerpc64/userent.h"
Architecture ABIs supported
x86_64 i386, x32 (when built as an x86_64 application); i386 (when built as an x32 application)
AArch64 ARM 32-bit EABI
-PowerPC 64-bit PowerPC 32-bit
+PowerPC 64-bit BE PowerPC 32-bit
RISC-V 64-bit RISC-V 32-bit
s390x s390
SPARC 64-bit SPARC 32-bit
* which led to segmentation fault.
*/
#undef TEST_MSGCTL_BOGUS_ADDR
-#if defined __GLIBC__ && defined POWERPC64
+#if defined __GLIBC__ && (defined POWERPC64 || defined POWERPC64LE)
# if !(defined __GLIBC_MINOR__) \
|| ((__GLIBC__ << 16) + __GLIBC_MINOR__ < (2 << 16) + 23)
# define TEST_MSGCTL_BOGUS_ADDR 0
# endif
-#endif /* __GLIBC__ && POWERPC64 */
+#endif /* __GLIBC__ && (POWERPC64 || POWERPC64LE) */
#ifndef TEST_MSGCTL_BOGUS_ADDR
# define TEST_MSGCTL_BOGUS_ADDR 1
#if SIZEOF_KERNEL_LONG_T > 4
# ifndef current_klongsize
if (current_klongsize < SIZEOF_KERNEL_LONG_T) {
-# if defined(AARCH64) || defined(POWERPC64)
+# if defined(AARCH64) || defined(POWERPC64) || defined(POWERPC64LE)
/* Align arg_no to the next even number. */
arg_no = (arg_no + 1) & 0xe;
-# endif /* AARCH64 || POWERPC64 */
+# endif /* AARCH64 || POWERPC64 || POWERPC64LE */
*val = ULONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]);
arg_no += 2;
} else