diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2015-09-02 03:38:53 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2015-09-28 16:29:11 +0300 |
commit | 59baae9a626396a3a05840279084c4bf2beb8f40 (patch) | |
tree | 2a7f5e111a6dba05b2553f8fd1182b863ffb5090 /linux-user/linuxload.c | |
parent | 84646ee25b68321624ef4768011e91064e4bd440 (diff) |
linux-user: remove MAX_ARG_PAGES limit
Instead of creating a temporary copy for the whole environment and
the arguments, directly copy everything to the target stack.
For this to work, we have to change the order of stack creation and
copying the arguments.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/linuxload.c')
-rw-r--r-- | linux-user/linuxload.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c index 506e837ae1..dbaf0ec586 100644 --- a/linux-user/linuxload.c +++ b/linux-user/linuxload.c @@ -135,10 +135,7 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp, struct linux_binprm *bprm) { int retval; - int i; - bprm->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int); - memset(bprm->page, 0, sizeof(bprm->page)); bprm->fd = fdexec; bprm->filename = (char *)filename; bprm->argc = count(argv); @@ -172,9 +169,5 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp, return retval; } - /* Something went wrong, return the inode and free the argument pages*/ - for (i=0 ; i<MAX_ARG_PAGES ; i++) { - g_free(bprm->page[i]); - } return(retval); } |