summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-03-13 19:07:29 -0600
committerTom Rini <trini@konsulko.com>2016-03-22 12:16:09 -0400
commitc1352119fd09a31ddb77710a0c3839d1af21fc65 (patch)
tree4d430612ca0d20b65a9c3f8d26263ec96cbc9e66 /arch
parent302a64875080d24932f1e4a8e2221e600b86629f (diff)
downloadu-boot-imx-c1352119fd09a31ddb77710a0c3839d1af21fc65.zip
u-boot-imx-c1352119fd09a31ddb77710a0c3839d1af21fc65.tar.gz
u-boot-imx-c1352119fd09a31ddb77710a0c3839d1af21fc65.tar.bz2
arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled
Update the link script to drop this code when not needed. This is only done for two architectures at present. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/u-boot.lds3
-rw-r--r--arch/x86/cpu/u-boot.lds4
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
index 13aa4fa..cfab8b0 100644
--- a/arch/arm/cpu/u-boot.lds
+++ b/arch/arm/cpu/u-boot.lds
@@ -14,6 +14,9 @@ OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
+#ifndef CONFIG_CMDLINE
+ /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
+#endif
#if defined(CONFIG_ARMV7_SECURE_BASE) && defined(CONFIG_ARMV7_NONSEC)
/*
* If CONFIG_ARMV7_SECURE_BASE is true, secure code will not
diff --git a/arch/x86/cpu/u-boot.lds b/arch/x86/cpu/u-boot.lds
index b0d8531..36f59ea 100644
--- a/arch/x86/cpu/u-boot.lds
+++ b/arch/x86/cpu/u-boot.lds
@@ -12,6 +12,10 @@ ENTRY(_start)
SECTIONS
{
+#ifndef CONFIG_CMDLINE
+ /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
+#endif
+
. = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
__text_start = .;
.text : { *(.text*); }