summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
diff options
context:
space:
mode:
authorPrabhakar Kushwaha <prabhakar@freescale.com>2014-04-08 19:12:31 +0530
committerYork Sun <yorksun@freescale.com>2014-04-22 17:58:50 -0700
commit651fcf6019eec1a65d4227082e12bc6ad4576f41 (patch)
treeb540b53b7f9a4e7b70737dc0bd73c3791a655b20 /arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
parent49efe85b35e61fb50b00ca02354dfca0d3c5c46c (diff)
downloadu-boot-imx-651fcf6019eec1a65d4227082e12bc6ad4576f41.zip
u-boot-imx-651fcf6019eec1a65d4227082e12bc6ad4576f41.tar.gz
u-boot-imx-651fcf6019eec1a65d4227082e12bc6ad4576f41.tar.bz2
powerpc:Add support of SPL non-relocation
Current SPL code base has BSS section placed after reset_vector. This means they have to relocate to use the global variables. This put an implicit requirement of having SPL size = Memory/2. To avoid relocation: - Move bss_section within SPL range - Modify relocate_code() Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/u-boot-spl.lds')
-rw-r--r--arch/powerpc/cpu/mpc85xx/u-boot-spl.lds12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
index 4fad68b..8453f3a 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
@@ -57,6 +57,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 +96,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 +111,5 @@ SECTIONS
}
. = ALIGN(4);
__bss_end = .;
+#endif
}