objtool: Use target file endianness instead of a compiled constant
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 14 Nov 2022 17:57:47 +0000 (23:27 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 Nov 2022 08:00:15 +0000 (19:00 +1100)
commit0646c28b417b7fe307c9da72ca1c508e43b57dc0
tree6e655e14bea59180dfa17356ad5f6f993f1b2918
parentefb11fdb3e1a9f694fa12b70b21e69e55ec59c36
objtool: Use target file endianness instead of a compiled constant

Some architectures like powerpc support both endianness, it's
therefore not possible to fix the endianness via arch/endianness.h
because there is no easy way to get the target endianness at
build time.

Use the endianness recorded in the file objtool is working on.

Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221114175754.1131267-10-sv@linux.ibm.com
tools/objtool/arch/x86/include/arch/endianness.h [deleted file]
tools/objtool/check.c
tools/objtool/include/objtool/endianness.h
tools/objtool/orc_dump.c
tools/objtool/orc_gen.c
tools/objtool/special.c