x86/insn: Support big endian cross-compiles
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 12 Nov 2020 23:03:23 +0000 (00:03 +0100)
committerJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 14 Jan 2021 00:13:11 +0000 (18:13 -0600)
commit1d509f2a6ebca1aea3089c769f6375f01a832e9b
tree35d674a10d5c2e0e5f0f56cb3520bd14958f5183
parentc8d7b7e592f471ec1da39d872dc6bbf767a812e7
x86/insn: Support big endian cross-compiles

The x86 instruction decoder code is shared across the kernel source and
the tools. Currently objtool seems to be the only tool from build tools
needed which breaks x86 cross-compilation on big endian systems. Make
the x86 instruction decoder build host endianness agnostic to support
x86 cross-compilation and enable objtool to implement endianness
awareness for big endian architectures support.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Co-developed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
arch/x86/include/asm/insn.h
arch/x86/lib/insn.c
arch/x86/tools/insn_sanity.c
tools/arch/x86/include/asm/insn.h
tools/arch/x86/lib/insn.c