[PATCH 1/2] ARM linker script: Fix barebox_image_size

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 23 04:02:41 EDT 2012


barebox_image_size was calculated wrong when PRE_IMAGE is defined.
In this case _text does not refer to the binary image start. We
have to use TEXT_BASE here.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/lib/barebox.lds.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S
index bc20694..3fd271b 100644
--- a/arch/arm/lib/barebox.lds.S
+++ b/arch/arm/lib/barebox.lds.S
@@ -105,5 +105,5 @@ SECTIONS
 	.bss : { *(.bss*) }
 	__bss_stop = .;
 	_end = .;
-	_barebox_image_size = __bss_start - _text;
+	_barebox_image_size = __bss_start - TEXT_BASE;
 }
-- 
1.7.9.1




More information about the barebox mailing list