]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/actux3/u-boot.lds
ARM: Fix __bss_start and __bss_end in linker scripts
[karo-tx-uboot.git] / board / actux3 / u-boot.lds
index a3bd02b0d2b2a016561ed2692fd70410df456bc7..44b990ee7ff5cb548aba07923e08e1a3ef6e77b4 100644 (file)
@@ -57,10 +57,13 @@ SECTIONS
 
        . = ALIGN(4);
        .u_boot_list : {
-       #include <u-boot.lst>
+               KEEP(*(SORT(.u_boot_list*)));
        }
 
        . = ALIGN (4);
+
+       __image_copy_end = .;
+
        .rel.dyn : {
                __rel_dyn_start = .;
                *(.rel*)
@@ -72,13 +75,27 @@ SECTIONS
                *(.dynsym)
        }
 
-       .bss __rel_dyn_start (OVERLAY) : {
-               __bss_start = .;
+       _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_base (OVERLAY) : {
                *(.bss*)
                 . = ALIGN(4);
-               _end = .;
+               __bss_limit = .;
        }
-       __bss_end__ =.;
+       .bss_end __bss_limit (OVERLAY) : {
+               KEEP(*(.__bss_end));
+       }
+
        /DISCARD/ : { *(.dynstr*) }
        /DISCARD/ : { *(.dynamic*) }
        /DISCARD/ : { *(.plt*) }