Commit 002c39db authored by Cédric Le Goater's avatar Cédric Le Goater Committed by Benjamin Herrenschmidt

powerpc/boot: Add little endian support to elf utils

Signed-off-by: default avatarCédric Le Goater <clg@fr.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 284b52c4
...@@ -26,7 +26,11 @@ int parse_elf64(void *hdr, struct elf_info *info) ...@@ -26,7 +26,11 @@ int parse_elf64(void *hdr, struct elf_info *info)
elf64->e_ident[EI_MAG2] == ELFMAG2 && elf64->e_ident[EI_MAG2] == ELFMAG2 &&
elf64->e_ident[EI_MAG3] == ELFMAG3 && elf64->e_ident[EI_MAG3] == ELFMAG3 &&
elf64->e_ident[EI_CLASS] == ELFCLASS64 && elf64->e_ident[EI_CLASS] == ELFCLASS64 &&
#ifdef __LITTLE_ENDIAN__
elf64->e_ident[EI_DATA] == ELFDATA2LSB &&
#else
elf64->e_ident[EI_DATA] == ELFDATA2MSB && elf64->e_ident[EI_DATA] == ELFDATA2MSB &&
#endif
(elf64->e_type == ET_EXEC || (elf64->e_type == ET_EXEC ||
elf64->e_type == ET_DYN) && elf64->e_type == ET_DYN) &&
elf64->e_machine == EM_PPC64)) elf64->e_machine == EM_PPC64))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment