From 98e12b5a6e05413420a7e3b3eca7fbfc2ff41b6d Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 25 Feb 2010 23:56:38 +0000 Subject: ARM: Fix decompressor's kernel size estimation for ROM=y Commit 2552fc2 changed the way the decompressor decides if it is safe to decompress the kernel directly to its final location. Unfortunately, it took the top of the compressed data as being the stack pointer, which it is for ROM=n cases. However, for ROM=y, the stack pointer is not relevant, and results in the wrong answer. Fix this by explicitly storing the end of the biggybacked data in the decompressor, and use that to calculate the compressed image size. CC: Signed-off-by: Russell King --- arch/arm/boot/compressed/vmlinux.lds.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/boot/compressed/vmlinux.lds.in') diff --git a/arch/arm/boot/compressed/vmlinux.lds.in b/arch/arm/boot/compressed/vmlinux.lds.in index a5924b9b88bd..cbed030b55cf 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.in +++ b/arch/arm/boot/compressed/vmlinux.lds.in @@ -36,6 +36,9 @@ SECTIONS _etext = .; + /* Assume size of decompressed image is 4x the compressed image */ + _image_size = (_etext - _text) * 4; + _got_start = .; .got : { *(.got) } _got_end = .; -- cgit v1.2.3