aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--linux-user/elfload.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index b721b107d..4d3dd89b2 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -512,31 +512,12 @@ do { \
static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop)
{
- abi_ulong pos = infop->start_stack;
- abi_ulong tmp;
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
- abi_ulong entry, toc;
-#endif
-
_regs->gpr[1] = infop->start_stack;
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
- entry = ldq_raw(infop->entry) + infop->load_addr;
- toc = ldq_raw(infop->entry + 8) + infop->load_addr;
- _regs->gpr[2] = toc;
- infop->entry = entry;
+ _regs->gpr[2] = ldq_raw(infop->entry + 8) + infop->load_addr;
+ infop->entry = ldq_raw(infop->entry) + infop->load_addr;
#endif
_regs->nip = infop->entry;
- /* Note that isn't exactly what regular kernel does
- * but this is what the ABI wants and is needed to allow
- * execution of PPC BSD programs.
- */
- /* FIXME - what to for failure of get_user()? */
- get_user_ual(_regs->gpr[3], pos);
- pos += sizeof(abi_ulong);
- _regs->gpr[4] = pos;
- for (tmp = 1; tmp != 0; pos += sizeof(abi_ulong))
- tmp = ldl(pos);
- _regs->gpr[5] = pos;
}
/* See linux kernel: arch/powerpc/include/asm/elf.h. */