]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/u-boot.lds
ARM: Fix __bss_start and __bss_end in linker scripts
[u-boot] / arch / arm / cpu / u-boot.lds
index b337e7bf515bf493db0fc358fd2129353ef50d9e..d5e42d3ac942a316590a56d97b3c1cddb2880f21 100644 (file)
@@ -52,7 +52,7 @@ SECTIONS
 
        . = ALIGN(4);
        .u_boot_list : {
-       #include <u-boot.lst>
+               KEEP(*(SORT(.u_boot_list*)));
        }
 
        . = ALIGN(4);
@@ -81,11 +81,24 @@ SECTIONS
                *(.mmutable)
        }
 
-       .bss __rel_dyn_start (OVERLAY) : {
-               __bss_start = .;
+/*
+ * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
+ * __bss_base and __bss_limit are for linker only (overlay ordering)
+ */
+
+       .bss_start __rel_dyn_start (OVERLAY) : {
+               KEEP(*(.__bss_start));
+               __bss_base = .;
+       }
+
+       .bss __bss_base (OVERLAY) : {
                *(.bss*)
                 . = ALIGN(4);
-               __bss_end = .;
+                __bss_limit = .;
+       }
+
+       .bss_end __bss_limit (OVERLAY) : {
+               KEEP(*(.__bss_end));
        }
 
        /DISCARD/ : { *(.dynstr*) }