]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libelf: correct mips64el test to use ELF header
authoremaste <emaste@FreeBSD.org>
Tue, 2 Oct 2018 15:08:41 +0000 (15:08 +0000)
committeremaste <emaste@FreeBSD.org>
Tue, 2 Oct 2018 15:08:41 +0000 (15:08 +0000)
commit4ae9b50914522c9c566211eca9653e0c14d4065f
tree04898a638a31fda24203a32af1e0569801c6d658
parentc0769df5240bf26839d7e5325dd029e87f53aa19
libelf: correct mips64el test to use ELF header

libelf maintains two views of endianness: e_byteorder, and
e_ident[EI_DATA] in the ELF header itself.  e_byteorder is not always
kept in sync, so use the ELF header endianness to test for mips64el.

PR: 231790
Bisected by: sbruno
Reviewed by: jhb
Approved by: re (kib)
MFC with: r338478
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17380
contrib/elftoolchain/libelf/gelf_mips64el.c