mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: df_elf: add missing endianness check
A s390x ELF file must use big-endian encoding. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
f93f437f8b
commit
eef0dd4fa4
@@ -48,7 +48,7 @@ bool ehdr_is_vmcore(const Elf64_Ehdr *ehdr)
|
||||
|
||||
bool ehdr_is_s390x(const Elf64_Ehdr *ehdr)
|
||||
{
|
||||
return ehdr->e_machine == EM_S390 &&
|
||||
return ehdr->e_machine == EM_S390 && ehdr->e_ident[EI_DATA] == ELFDATA2MSB &&
|
||||
ehdr->e_ident[EI_CLASS] == ELFCLASS64;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user