On 23 August 2015 at 00:47, Stefan Brüns <stefan.bru...@rwth-aachen.de> wrote: > 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. > > Signed-off-by: Stefan Brüns <stefan.bru...@rwth-aachen.de>
This doesn't seem to compile: CC arm-linux-user/linux-user/elfload.o /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c: In function ‘load_elf_binary’: /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c:2210:5: error: passing argument 3 of ‘copy_elf_strings’ from incompatible pointer type [-Werror] bprm->p = copy_elf_strings(1, &bprm->filename, scratch, bprm->p, info->stack_limit); ^ /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c:1368:18: note: expected ‘char *’ but argument is of type ‘void **’ static abi_ulong copy_elf_strings(int argc,char ** argv, char* scratch, ^ /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c:2211:5: error: passing argument 3 of ‘copy_elf_strings’ from incompatible pointer type [-Werror] bprm->p = copy_elf_strings(bprm->envc, bprm->envp, scratch, bprm->p, info->stack_limit); ^ /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c:1368:18: note: expected ‘char *’ but argument is of type ‘void **’ static abi_ulong copy_elf_strings(int argc,char ** argv, char* scratch, ^ /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c:2212:5: error: passing argument 3 of ‘copy_elf_strings’ from incompatible pointer type [-Werror] bprm->p = copy_elf_strings(bprm->argc, bprm->argv, scratch, bprm->p, info->stack_limit); ^ /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/elfload.c:1368:18: note: expected ‘char *’ but argument is of type ‘void **’ static abi_ulong copy_elf_strings(int argc,char ** argv, char* scratch, ^ cc1: all warnings being treated as errors It also has a number of checkpatch.pl warnings. thanks -- PMM