[Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-28 Thread Richard Henderson
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 272 ++--- 1 files change

Re: [Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-05 Thread Richard Henderson
On 04/05/2010 11:14 AM, malc wrote: >> +} >> +interp_name = malloc(eppnt->p_filesz); > > malloc can fail > >> + >> +if (eppnt->p_offset + eppnt->p_filesz <= BPRM_BUF_SIZE) { >> +memcpy(interp_name, bprm_buf + eppnt->p_offset, >> +

Re: [Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > This requires moving the PT_INTERP extraction and GUEST_BASE > handling into load_elf_image. Key this off a non-null pointer > argument to receive the interpreter name. > > Signed-off-by: Richard Henderson > --- > linux-user/elfload.c | 269 > ++

[Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-05 Thread Richard Henderson
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 269 ++ 1 files chang