Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: set --be8 when linking modules

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.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>

Ben Dooks 0ab89d0b f592d323

+1
+1
arch/arm/Makefile
··· 16 16 LDFLAGS_vmlinux :=-p --no-undefined -X 17 17 ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 18 18 LDFLAGS_vmlinux += --be8 19 + LDFLAGS_MODULE += --be8 19 20 endif 20 21 21 22 OBJCOPYFLAGS :=-O binary -R .comment -S