diff options
author | Paul Brook <paul@codesourcery.com> | 2010-06-16 13:03:51 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2010-06-16 13:03:51 +0100 |
commit | 97374d38583028b33074c69caf296d94cb1b9d5b (patch) | |
tree | 20dd2e75e0b7dcf623a084e19e3f5e39a9161f31 /linux-user/flatload.c | |
parent | 9e0b74a43f5ab94acdc5b450747b8f6c184e0062 (diff) | |
download | qemu-97374d38583028b33074c69caf296d94cb1b9d5b.zip qemu-97374d38583028b33074c69caf296d94cb1b9d5b.tar.gz qemu-97374d38583028b33074c69caf296d94cb1b9d5b.tar.bz2 |
Usermode exec-stack fix
When loading a shared library that requires an executable stack,
glibc uses the mprotext PROT_GROWSDOWN flag to achieve this.
We don't support PROT_GROWSDOWN.
Add a special case to handle changing the stack permissions in this way.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'linux-user/flatload.c')
-rw-r--r-- | linux-user/flatload.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 914de1f..8ad130a 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -802,6 +802,7 @@ int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, info->end_data = libinfo[0].end_data; info->start_brk = libinfo[0].start_brk; info->start_stack = sp; + info->stack_limit = libinfo[0].start_brk; info->entry = start_addr; info->code_offset = info->start_code; info->data_offset = info->start_data - libinfo[0].text_len; |