Merge git://git.denx.de/u-boot-imx
[oweals/u-boot.git] / arch / powerpc / cpu / mpc85xx / u-boot-spl.lds
index 4fad68b40c5262ba6ca25bd1a75af3af8965b343..04951825d49d456a4f55817820066370235d022a 100644 (file)
@@ -1,13 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * (C) Copyright 2006
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de
  *
  * Copyright 2009 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include "config.h"    /* CONFIG_BOARDDIR */
+#include "config.h"
 
 OUTPUT_ARCH(powerpc)
 #ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
@@ -29,7 +28,6 @@ SECTIONS
                _GOT2_TABLE_ = .;
                KEEP(*(.got2))
                KEEP(*(.got))
-               PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
                _FIXUP_TABLE_ = .;
                KEEP(*(.fixup))
        }
@@ -57,6 +55,16 @@ SECTIONS
        . = ALIGN(8);
        __init_begin = .;
        __init_end = .;
+#ifdef CONFIG_SPL_SKIP_RELOCATE
+       . = ALIGN(4);
+       __bss_start = .;
+       .bss : {
+               *(.sbss*)
+               *(.bss*)
+       }
+       . = ALIGN(4);
+       __bss_end = .;
+#endif
 
 /* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
 #ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
@@ -86,6 +94,7 @@ SECTIONS
        } = 0xffff
 #endif
 
+#ifndef CONFIG_SPL_SKIP_RELOCATE
        /*
         * Make sure that the bss segment isn't linked at 0x0, otherwise its
         * address won't be updated during relocation fixups.
@@ -100,4 +109,5 @@ SECTIONS
        }
        . = ALIGN(4);
        __bss_end = .;
+#endif
 }