aboutsummaryrefslogtreecommitdiff
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
parentSet FD bit in SR to emulate kernel behaviour, by Magnus Damm. (diff)
downloadqemu-kvm-072ae847f9ac50392f618b7bcf01184b31f49a8f.tar.gz
qemu-kvm-072ae847f9ac50392f618b7bcf01184b31f49a8f.tar.bz2
qemu-kvm-072ae847f9ac50392f618b7bcf01184b31f49a8f.zip
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 c0845fe65..f844eff50 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