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

ARM: zImage: make sure the stack is 64-bit aligned

With ARMv5+ and EABI, the compiler expects a 64-bit aligned stack so
instructions like STRD and LDRD can be used. Without this, mysterious
boot failures were seen semi randomly with the LZMA decompressor.

While at it, let's align .bss as well.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
CC: stable@kernel.org

authored by

Nicolas Pitre and committed by
Nicolas Pitre
3bd2cbb9 0ce790e7

+2 -1
+1 -1
arch/arm/boot/compressed/Makefile
··· 74 74 ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS) 75 75 else 76 76 ZTEXTADDR := 0 77 - ZBSSADDR := ALIGN(4) 77 + ZBSSADDR := ALIGN(8) 78 78 endif 79 79 80 80 SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
+1
arch/arm/boot/compressed/vmlinux.lds.in
··· 54 54 .bss : { *(.bss) } 55 55 _end = .; 56 56 57 + . = ALIGN(8); /* the stack must be 64-bit aligned */ 57 58 .stack : { *(.stack) } 58 59 59 60 .stab 0 : { *(.stab) }