aboutsummaryrefslogtreecommitdiff
path: root/arch/avr32/lib
diff options
context:
space:
mode:
authorAndreas Bießmann2013-05-07 23:25:17 +0000
committerAndreas Bießmann2013-05-13 10:35:12 +0200
commita7e62be09189dae3a16882e53f15c38754f9db91 (patch)
tree44a0c46e42517ecb4ab7be532b558d9796f45f07 /arch/avr32/lib
parentbbd0f7e3ba66d288a2f146f1c7797801e04598ae (diff)
avr32: fix relocation address calculation
Commit 1865286466a5d0c7f2e3c37632da56556c838e9e (Introduce generic link section.h symbol files) changed the __bss_end symbol type from char[] to ulong. This led to wrong relocation parameters which ended up in a not working u-boot. Unfortunately this is not clear to see cause due to RAM aliasing we may get a 'half-working' u-boot then. Fix this by dereferencing the __bss_end symbol where needed. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/avr32/lib')
-rw-r--r--arch/avr32/lib/board.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index ccf862a7fbf..2e79e98eb0d 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -116,7 +116,7 @@ static int display_banner (void)
printf ("\n\n%s\n\n", version_string);
printf ("U-Boot code: %08lx -> %08lx data: %08lx -> %08lx\n",
(unsigned long)_text, (unsigned long)_etext,
- (unsigned long)_data, (unsigned long)__bss_end);
+ (unsigned long)_data, (unsigned long)(&__bss_end));
return 0;
}
@@ -183,7 +183,7 @@ void board_init_f(ulong board_type)
* - stack
*/
addr = CONFIG_SYS_SDRAM_BASE + sdram_size;
- monitor_len = (char *)__bss_end - _text;
+ monitor_len = (char *)(&__bss_end) - _text;
/*
* Reserve memory for u-boot code, data and bss.