From 8cf6e9daca19e08216cf09e523d1dcdf3cfdaec7 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 22 Sep 2016 18:13:07 +0100 Subject: loader: Allow ELF loader to auto-detect the ELF arch 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 Reviewed-by: Peter Maydell Message-id: f2d70b47fcad31445f947f8817a0e146d80a046b.1474331683.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell --- include/hw/loader.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hw/loader.h') diff --git a/include/hw/loader.h b/include/hw/loader.h index 4879b63a2f..c59673dfc5 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -68,6 +68,8 @@ const char *load_elf_strerror(int error); * load will fail if the target ELF does not match. Some architectures * have some architecture-specific behaviours that come into effect when * their particular values for @elf_machine are set. + * If @elf_machine is EM_NONE then the machine type will be read from the + * ELF header and no checks will be carried out against the machine type. */ int load_elf(const char *filename, uint64_t (*translate_fn)(void *, uint64_t), -- cgit v1.2.1