[PATCH 14/14] ARM: set --be8 when linking modules

Nicolas Pitre
2013-07-24T23:41:10Z

On Wed, 24 Jul 2013, Ben Dooks wrote:

> To avoid having to make every text section swap the instruction order
> of all instructions, make sure modules are built also built with --be8
> (as is the current kernel final link).
>
> If we do not do this, we would end up having to swap all instructions
> when loading a module, instead of just the instructions that we are
> applying ELF relocations to.

That wouldn't work anyway as you'd also swap constants embedded in the
instruction stream such as literal pools which are most certainly in BE
mode already.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Please make sure the kernel will reject modules if they're not compiled
appropriately. Either by looking at the ELF record or by altering
MODULE_ARCH_VERMAGIC.

Nicolas