Since commit 44c6e6591cb451ae606f8bde71dd5fb7b4002544
"rename _end to __bss_end__" , the _end was removed.
But we need it now for separated device tree control,
ie, CONFIG_OF_SEPARATE .

Though _end used to be the end of u-boot.bin image,
we mark it up and relocate the dtb part of u-boot-dtb.bin
here to be used by fdtdec_setup().

Signed-off-by: Thomas Chou <tho...@wytron.com.tw>
---
 arch/nios2/cpu/u-boot.lds | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/nios2/cpu/u-boot.lds b/arch/nios2/cpu/u-boot.lds
index 6e174be..2d43602 100644
--- a/arch/nios2/cpu/u-boot.lds
+++ b/arch/nios2/cpu/u-boot.lds
@@ -50,9 +50,10 @@ SECTIONS
          *(.gnu.linkonce.d*)
        }
 
-       . = ALIGN(16);
-       _gp = .;                        /* Global pointer addr */
-       PROVIDE (gp = .);
+       /* gp - Since we don't use gp for small data with option "-G0",
+        * we will use gp as global data pointer. The _gp location is
+        * not needed.
+        */
 
        .sdata :
        {
@@ -62,6 +63,9 @@ SECTIONS
        }
        . = ALIGN(4);
 
+       /* _edata - This is end of u-boot.bin image.
+        * dtb will be appended here to make u-boot-dtb.bin
+         */
        _edata = .;
        PROVIDE (edata = .);
 
@@ -88,6 +92,12 @@ SECTIONS
        }
        . = ALIGN(4);
        __bss_end = .;
+
+       /* _end - Though _end used to be the end of u-boot.bin image,
+        * we mark it up and relocate the dtb part of u-boot-dtb.bin here
+        * to be used by fdtdec_setup().
+        */
+       _end = .;
        PROVIDE (end = .);
 
        /* DEBUG -- symbol table, string table, etc. etc.
-- 
2.1.4

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

Reply via email to