[PATCH] x86: Fix building on BE
From: Segher Boessenkool
Date: Thu Sep 29 2016 - 07:51:00 EST
We need to call GET_LE to read hdr->e_type.
Signed-off-by: Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx>
---
arch/x86/entry/vdso/vdso2c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index 4f74119..3dab75f 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/entry/vdso/vdso2c.h
@@ -22,7 +22,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
- if (hdr->e_type != ET_DYN)
+ if (GET_LE(&hdr->e_type) != ET_DYN)
fail("input is not a shared object\n");
/* Walk the segment table. */
--
1.9.3