Skip to content

Commit

Permalink
ARM: zImage: make sure the stack is 64-bit aligned
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed May 7, 2011
1 parent 0ce790e commit 3bd2cbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/compressed/vmlinux.lds.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ SECTIONS
.bss : { *(.bss) }
_end = .;

. = ALIGN(8); /* the stack must be 64-bit aligned */
.stack : { *(.stack) }

.stab 0 : { *(.stab) }
Expand Down

0 comments on commit 3bd2cbb

Please sign in to comment.