From: Simon Glass Date: Mon, 14 Mar 2016 01:07:29 +0000 (-0600) Subject: arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled X-Git-Tag: v2016.05-rc1~226 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c1352119fd09a31ddb77710a0c3839d1af21fc65;p=u-boot 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 Reviewed-by: Tom Rini --- diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 13aa4fa488..cfab8b0412 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 b0d8531a60..36f59ea96d 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*); }