summaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 43d989e9a0..285d8f5c73 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -261,6 +261,9 @@ unsigned long setup_arg_pages(unsigned long p, struct linux_binprm * bprm,
/* Create enough stack to hold everything. If we don't use
* it for args, we'll use it for something else...
*/
+ /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
+ we allocate a bigger stack. Need a better solution, for example
+ by remapping the process stack directly at the right place */
if(x86_stack_size > MAX_ARG_PAGES*X86_PAGE_SIZE) {
if((long)mmap4k((void *)(X86_STACK_TOP-x86_stack_size), x86_stack_size + X86_PAGE_SIZE,
PROT_READ | PROT_WRITE,