elf-loader: warn about invalid endianness

fprintf(stderr) is how errors are reported in this file.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Philippe Mathieu-Daudé 2017-06-23 13:45:55 -03:00 committed by Michael Tokarev
parent e189091fba
commit c8e1158cf6
1 changed files with 1 additions and 0 deletions

View File

@ -478,6 +478,7 @@ int load_elf_ram(const char *filename,
}
if (target_data_order != e_ident[EI_DATA]) {
fprintf(stderr, "%s: wrong endianness\n", filename);
ret = ELF_LOAD_WRONG_ENDIAN;
goto fail;
}