Merge branch 'master' of git://git.denx.de/u-boot-spi
[platform/kernel/u-boot.git] / arch / arm / cpu / u-boot.lds
index 227aaff..3037885 100644 (file)
@@ -33,9 +33,9 @@ SECTIONS
        . = ALIGN(4);
        .text :
        {
-               __image_copy_start = .;
-               CPUDIR/start.o (.text)
-               *(.text)
+               *(.__image_copy_start)
+               CPUDIR/start.o (.text*)
+               *(.text*)
        }
 
        . = ALIGN(4);
@@ -43,7 +43,7 @@ SECTIONS
 
        . = ALIGN(4);
        .data : {
-               *(.data)
+               *(.data*)
        }
 
        . = ALIGN(4);
@@ -52,22 +52,28 @@ SECTIONS
 
        . = ALIGN(4);
        .u_boot_list : {
-       #include <u-boot.lst>
+               KEEP(*(SORT(.u_boot_list*)));
        }
 
        . = ALIGN(4);
 
-       __image_copy_end = .;
+       .image_copy_end :
+       {
+               *(.__image_copy_end)
+       }
+
+       .rel_dyn_start :
+       {
+               *(.__rel_dyn_start)
+       }
 
        .rel.dyn : {
-               __rel_dyn_start = .;
                *(.rel*)
-               __rel_dyn_end = .;
        }
 
-       .dynsym : {
-               __dynsym_start = .;
-               *(.dynsym)
+       .rel_dyn_end :
+       {
+               *(.__rel_dyn_end)
        }
 
        _end = .;
@@ -81,13 +87,27 @@ SECTIONS
                *(.mmutable)
        }
 
-       .bss __rel_dyn_start (OVERLAY) : {
-               __bss_start = .;
-               *(.bss)
+/*
+ * 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/ : { *(.dynsym) }
        /DISCARD/ : { *(.dynstr*) }
        /DISCARD/ : { *(.dynamic*) }
        /DISCARD/ : { *(.plt*) }