aboutsummaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index eda6e9ba23..f1af656dc0 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -247,6 +247,31 @@ static inline void init_thread(struct target_pt_regs *_regs, struct image_info *
#endif
+#ifdef TARGET_MIPS
+
+#define ELF_START_MMAP 0x80000000
+
+#define elf_check_arch(x) ( (x) == EM_MIPS )
+
+#define ELF_CLASS ELFCLASS32
+#ifdef TARGET_WORDS_BIGENDIAN
+#define ELF_DATA ELFDATA2MSB
+#else
+#define ELF_DATA ELFDATA2LSB
+#endif
+#define ELF_ARCH EM_MIPS
+
+#define ELF_PLAT_INIT(_r)
+
+static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop)
+{
+ regs->cp0_status = CP0St_UM;
+ regs->cp0_epc = infop->entry;
+ regs->regs[29] = infop->start_stack;
+}
+
+#endif /* TARGET_MIPS */
+
#ifndef ELF_PLATFORM
#define ELF_PLATFORM (NULL)
#endif