summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1994-12-01 08:00:00 +0000
committer <ralf@linux-mips.org>1994-12-01 08:00:00 +0000
commit90ecc248e200fee448001248dde0ca540dd3ef64 (patch)
treea3fe89494ce63b4835f0f9cf5c45e74cde88252b /fs/binfmt_elf.c
parent1513ff9b7899ab588401c89db0e99903dbf5f886 (diff)
Import of Linux/MIPS 1.1.68
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index c2dc5cbca..fd5e41cdc 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -638,8 +638,13 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
error = do_mmap(NULL, 0, 4096, PROT_READ | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE, 0);
+#if defined (__i386__)
regs->eip = elf_entry; /* eip, magic happens :-) */
regs->esp = bprm->p; /* stack pointer */
+#elif defined (__mips__)
+ regs->cp0_epc = elf_entry; /* eip, magic happens :-) */
+ regs->reg29 = bprm->p; /* stack pointer */
+#endif
if (current->flags & PF_PTRACED)
send_sig(SIGTRAP, current, 0);
#ifndef CONFIG_BINFMT_ELF