]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libelf: correct mips64el test to use ELF header
authorEd Maste <emaste@FreeBSD.org>
Tue, 2 Oct 2018 15:08:41 +0000 (15:08 +0000)
committerEd Maste <emaste@FreeBSD.org>
Tue, 2 Oct 2018 15:08:41 +0000 (15:08 +0000)
commit1c45d770a75779c3a08251abffe3dccdc0a8dbf9
tree04898a638a31fda24203a32af1e0569801c6d658
parent7462fc7f56f598d220003387123f73b371300bd2
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