]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/u-boot.lds
ARM: enhance u-boot.lds to detect over-sized SPL
[karo-tx-uboot.git] / arch / arm / cpu / u-boot.lds
index 227aaff1e60b822056736137e402faf6a3e707a9..e6b202bd14765a1a24e8bd87f88e2166df79383e 100644 (file)
@@ -34,8 +34,8 @@ SECTIONS
        .text :
        {
                __image_copy_start = .;
-               CPUDIR/start.o (.text)
-               *(.text)
+               CPUDIR/start.o (.text*)
+               *(.text*)
        }
 
        . = ALIGN(4);
@@ -43,7 +43,7 @@ SECTIONS
 
        . = ALIGN(4);
        .data : {
-               *(.data)
+               *(.data*)
        }
 
        . = ALIGN(4);
@@ -83,7 +83,7 @@ SECTIONS
 
        .bss __rel_dyn_start (OVERLAY) : {
                __bss_start = .;
-               *(.bss)
+               *(.bss*)
                 . = ALIGN(4);
                __bss_end__ = .;
        }
@@ -94,3 +94,7 @@ SECTIONS
        /DISCARD/ : { *(.interp*) }
        /DISCARD/ : { *(.gnu*) }
 }
+
+#if defined(CONFIG_SPL_TEXT_BASE) && defined(CONFIG_SPL_MAX_SIZE)
+ASSERT(__bss_end__ < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big");
+#endif