Re: [Qemu-devel] [PATCH v6 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-25 Thread Alistair Francis
On Tue, May 24, 2016 at 3:08 PM, Cleber Rosa wrote: > > On 05/13/2016 05:37 PM, Alistair Francis wrote: >> >> >> +if (elf_machine < 1) { >> +/* The caller didn't specify and ARCH, we can figure it out */ > > > Spotted a comment typo: s/and/an/ Thanks, sending a version 7 with it fixed

Re: [Qemu-devel] [PATCH v6 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-24 Thread Cleber Rosa
On 05/13/2016 05:37 PM, Alistair Francis wrote: +if (elf_machine < 1) { +/* The caller didn't specify and ARCH, we can figure it out */ Spotted a comment typo: s/and/an/ +lseek(fd, 0x12, SEEK_SET); +if (read(fd, &e_machine, sizeof(e_machine)) != sizeof(e_machine)

[Qemu-devel] [PATCH v6 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-13 Thread Alistair Francis
If the caller didn't specify an architecture for the ELF machine the load_elf() function will auto detect it based on the ELF file. Signed-off-by: Alistair Francis --- hw/core/loader.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/core/loader.c b/hw/core/loader.c index c049