ARM: zImage: make sure the stack is 64-bit aligned
authorNicolas Pitre <nicolas.pitre@linaro.org>
Fri, 22 Apr 2011 01:45:08 +0000 (21:45 -0400)
committerNicolas Pitre <nico@fluxnic.net>
Sat, 7 May 2011 03:55:49 +0000 (23:55 -0400)
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
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/vmlinux.lds.in

index 8ebbb511c7836383aac94622d0ed00aed5c5f29a..0c6852d93506c0afef2841ea21df84ae72d907d5 100644 (file)
@@ -74,7 +74,7 @@ ZTEXTADDR     := $(CONFIG_ZBOOT_ROM_TEXT)
 ZBSSADDR       := $(CONFIG_ZBOOT_ROM_BSS)
 else
 ZTEXTADDR      := 0
-ZBSSADDR       := ALIGN(4)
+ZBSSADDR       := ALIGN(8)
 endif
 
 SEDFLAGS       = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
index 5309909d72823592dc7e9f6db0ba1e73574da46d..ea80abe788449444a685339c01a128e04250ceb8 100644 (file)
@@ -54,6 +54,7 @@ SECTIONS
   .bss                 : { *(.bss) }
   _end = .;
 
+  . = ALIGN(8);                /* the stack must be 64-bit aligned */
   .stack               : { *(.stack) }
 
   .stab 0              : { *(.stab) }
This page took 0.028725 seconds and 5 git commands to generate.