]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
powerpc/mpc85xx: support application without resetvec segment in the linker script
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc85xx / u-boot-spl.lds
index cf6fa7c936dcc54f2f7776bce9bfb5090e11e8eb..4591760e2d50e43276879c17f62845ced611e484 100644 (file)
 #include "config.h"    /* CONFIG_BOARDDIR */
 
 OUTPUT_ARCH(powerpc)
+#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
+PHDRS
+{
+       text PT_LOAD;
+       bss PT_LOAD;
+}
+#endif
 SECTIONS
 {
        . = CONFIG_SPL_TEXT_BASE;
@@ -68,9 +75,16 @@ SECTIONS
 #else
 #error unknown NAND controller
 #endif
+#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
+       .bootpg ADDR(.text) - 0x1000 :
+       {
+               KEEP(*(.bootpg))
+       } :text = 0xffff
+#else
        .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
                KEEP(*(.resetvec))
        } = 0xffff
+#endif
 
        /*
         * Make sure that the bss segment isn't linked at 0x0, otherwise its