Index: head/contrib/elftoolchain/libelf/gelf_mips64el.c =================================================================== --- head/contrib/elftoolchain/libelf/gelf_mips64el.c +++ head/contrib/elftoolchain/libelf/gelf_mips64el.c @@ -34,8 +34,9 @@ _libelf_is_mips64el(Elf *e) { - return (e->e_kind == ELF_K_ELF && e->e_byteorder == ELFDATA2LSB && - e->e_u.e_elf.e_ehdr.e_ehdr64->e_machine == EM_MIPS); + return (e->e_kind == ELF_K_ELF && + e->e_u.e_elf.e_ehdr.e_ehdr64->e_machine == EM_MIPS && + e->e_u.e_elf.e_ehdr.e_ehdr64->e_ident[EI_DATA] == ELFDATA2LSB); } /*