]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/actux2/u-boot.lds
ARM: Fix __bss_start and __bss_end in linker scripts
[karo-tx-uboot.git] / board / actux2 / u-boot.lds
index e9b5547b7afe65ee0d5f09bcfe44f05abe2ffe2e..00ad8b71cd065bc466611c9dfc9d145511d61952 100644 (file)
@@ -61,6 +61,9 @@ SECTIONS
        }
 
        . = ALIGN (4);
+
+       __image_copy_end = .;
+
        .rel.dyn : {
                __rel_dyn_start = .;
                *(.rel*)
@@ -74,17 +77,23 @@ SECTIONS
 
        _end = .;
 
+/*
+ * 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_start (OVERLAY) : {
+       .bss __bss_base (OVERLAY) : {
                *(.bss*)
                 . = ALIGN(4);
-                ___bssend___ = .;
+                __bss_limit = .;
        }
-       .bss_end ___bssend___ (OVERLAY) : {
-               KEEP(*(.__bss_end__));
+       .bss_end __bss_limit (OVERLAY) : {
+               KEEP(*(.__bss_end));
        }
 
        /DISCARD/ : { *(.dynstr*) }