libelf maintains two views of endianness: e_byteorder, and e_ident[EI_DATA] in the ELF header itself. e_byteorder is not necessarily always in sync, so use the ELF header endianness to test for mips64le.
PR: 231790
See also D15734
Differential D17380
libelf: correct mips64 test to use ELF header emaste on Oct 1 2018, 9:00 PM. Authored by Tags None Referenced Files
Details libelf maintains two views of endianness: e_byteorder, and e_ident[EI_DATA] in the ELF header itself. e_byteorder is not necessarily always in sync, so use the ELF header endianness to test for mips64le. PR: 231790
Diff Detail
Event TimelineComment Actions Note that the original change in D15734 only calls _libelf_is_mips64el in 64-bit cases so in practice it won't be an issue (the test already checked e_ehdr64->e_machine), and I hope we can soon replace it with a general translator as you mentioned earlier. But I could add a safety-belt until that happens. |