summaryrefslogtreecommitdiffstats
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin2011-06-14 16:51:11 +0200
committerMichael S. Tsirkin2011-06-15 17:27:15 +0200
commitbefeac45d4d9afb587eca9a27d975db4a7950960 (patch)
treeaab24c856a3ea944e287d7f2591bb4bab6a56eb4 /linux-user/elfload.c
parentprint meaningful error message in case of --disable-vhost-net (diff)
parentconfigure: Detect and don't try to use older libcurl (diff)
downloadqemu-befeac45d4d9afb587eca9a27d975db4a7950960.tar.gz
qemu-befeac45d4d9afb587eca9a27d975db4a7950960.tar.xz
qemu-befeac45d4d9afb587eca9a27d975db4a7950960.zip
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 4c399f8e33..dcfeb7a286 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -867,6 +867,25 @@ static inline void init_thread(struct target_pt_regs *regs,
#endif /* TARGET_ALPHA */
+#ifdef TARGET_S390X
+
+#define ELF_START_MMAP (0x20000000000ULL)
+
+#define elf_check_arch(x) ( (x) == ELF_ARCH )
+
+#define ELF_CLASS ELFCLASS64
+#define ELF_DATA ELFDATA2MSB
+#define ELF_ARCH EM_S390
+
+static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop)
+{
+ regs->psw.addr = infop->entry;
+ regs->psw.mask = PSW_MASK_64 | PSW_MASK_32;
+ regs->gprs[15] = infop->start_stack;
+}
+
+#endif /* TARGET_S390X */
+
#ifndef ELF_PLATFORM
#define ELF_PLATFORM (NULL)
#endif