When U-Boot is relocated from flash to RAM pointers are modified
accordingly.  However, pointers initialzed with NULL values should not
be modified so that they maintain their intended NULL value.  The
address of the BSS segment must be modified during relocation which
means that it must not have a NULL value.

Signed-off-by: Peter Tyser <pty...@xes-inc.com>
---
 cpu/mpc85xx/u-boot.lds.S |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/cpu/mpc85xx/u-boot.lds.S b/cpu/mpc85xx/u-boot.lds.S
index a347cd1..ef3de66 100644
--- a/cpu/mpc85xx/u-boot.lds.S
+++ b/cpu/mpc85xx/u-boot.lds.S
@@ -131,6 +131,14 @@ SECTIONS
 
   . = RESET_VECTOR_ADDRESS + 0x4;
 
+  /*
+   * Make sure that the bss segment doesn't start at 0x0, otherwise its
+   * address won't be updated during relocation fixups
+   */
+#if !((RESET_VECTOR_ADDRESS + 0x4) & 0xffffffff)
+  . |= 0x10;
+#endif
+
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-- 
1.6.2.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to