mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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 <alistair.francis@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: f2d70b47fcad31445f947f8817a0e146d80a046b.1474331683.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
1372fc0b87
commit
8cf6e9daca
2 changed files with 7 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue