summaryrefslogtreecommitdiffstats
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-22 10:13:51 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-22 10:13:51 +0000
commit072ae847f9ac50392f618b7bcf01184b31f49a8f (patch)
tree02f6126c46cfecfbaa3bf39e380a150cc0642307 /linux-user/elfload.c
parent4c909d14c26bcdc1f62f2d6943bf640381f6b0dc (diff)
downloadhqemu-072ae847f9ac50392f618b7bcf01184b31f49a8f.zip
hqemu-072ae847f9ac50392f618b7bcf01184b31f49a8f.tar.gz
Setup stack properly, fixes wrong argc value problem, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3000 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index c0845fe..f844eff 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -325,7 +325,7 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
{
/* Check other registers XXXXX */
regs->pc = infop->entry;
- regs->regs[15] = infop->start_stack - 16 * 4;
+ regs->regs[15] = infop->start_stack;
}
#define USE_ELF_CORE_DUMP
OpenPOWER on IntegriCloud