summary refs log tree commit diff stats
path: root/linux-user/s390x/target_elf.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-08-28 12:31:49 +1000
committerRichard Henderson <richard.henderson@linaro.org>2025-08-30 07:04:04 +1000
commitdabda4f36a992dffde252919124a25fe7054fe42 (patch)
treec781163727bd59b3413bb8a7614f1f52788361f5 /linux-user/s390x/target_elf.h
parent71c2c79815fafe6d509ca1a76bc67d6041aaa37b (diff)
downloadfocaccia-qemu-dabda4f36a992dffde252919124a25fe7054fe42.tar.gz
focaccia-qemu-dabda4f36a992dffde252919124a25fe7054fe42.zip
linux-user/s390x: Expand target_elf_gregset_t
Make use of the fact that target_elf_gregset_t is a proper structure.
This lets us drop the ugly cast to uint32_t* in the middle.

Drop ELF_NREG, target_elf_greg_t, and tswapreg.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/s390x/target_elf.h')
-rw-r--r--linux-user/s390x/target_elf.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/linux-user/s390x/target_elf.h b/linux-user/s390x/target_elf.h
index b7d863ee66..670c7b3eed 100644
--- a/linux-user/s390x/target_elf.h
+++ b/linux-user/s390x/target_elf.h
@@ -8,15 +8,17 @@
 #ifndef S390X_TARGET_ELF_H
 #define S390X_TARGET_ELF_H
 
+#include "target_ptrace.h"
+
 #define HAVE_ELF_HWCAP          1
 #define HAVE_ELF_CORE_DUMP      1
 
-typedef abi_ulong target_elf_greg_t;
-
-/* See linux kernel: arch/s390/include/uapi/asm/ptrace.h (s390_regs).  */
-#define ELF_NREG                27
+/*
+ * See linux kernel: arch/s390/include/asm/elf.h, where
+ * elf_gregset_t is typedef'd to struct s390_regs.
+ */
 typedef struct target_elf_gregset_t {
-    target_elf_greg_t regs[ELF_NREG];
+    struct target_s390_regs pt;
 } target_elf_gregset_t;
 
 #endif