x86: spl: Make moving BSS conditional
authorSimon Glass <sjg@chromium.org>
Sun, 24 Jan 2021 17:06:06 +0000 (10:06 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 1 Feb 2021 07:33:24 +0000 (15:33 +0800)
At present BSS is always placed in SDRAM. If a separate BSS is not in use
this means that BSS doesn't work as expected. Make the setting conditional
on the SEPARATE_BSS option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/u-boot-spl.lds

index ead4f38..b82e53a 100644 (file)
@@ -57,7 +57,9 @@ SECTIONS
 
         _image_binary_end = .;
 
+#if CONFIG_IS_ENABLED(SEPARATE_BSS)
        . = 0x120000;
+#endif
        .bss (OVERLAY) : {
                __bss_start = .;
                *(.bss*)