From ec56a4b355cf9119dc1760c15c0d16dad20995cd Mon Sep 17 00:00:00 2001 From: David Thornley Date: Tue, 17 Jan 2017 14:15:39 +1100 Subject: [PATCH] Fixed jit (bytecode save) elf header flags for mips when run on host with different endianness --- src/jit/bcsave.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua index 5c417c06..c043e581 100644 --- a/src/jit/bcsave.lua +++ b/src/jit/bcsave.lua @@ -239,7 +239,7 @@ typedef struct { hdr.type = f16(1) hdr.machine = f16(({ x86=3, x64=62, arm=40, ppc=20, ppcspe=20, mips=8, mipsel=8 })[ctx.arch]) if ctx.arch == "mips" or ctx.arch == "mipsel" then - hdr.flags = 0x50001006 + hdr.flags = f32(0x50001006) -- EF_MIPS_ARCH_32|E_MIPS_ABI_O32|EF_MIPS_CPIC|EF_MIPS_PIC end hdr.version = f32(1) hdr.shofs = fofs(ffi.offsetof(o, "sect"))