From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 25 Feb 2016 21:00:50 -0700 Subject: [U-Boot] [PATCH 3/9] arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled In-Reply-To: <1456459256-32643-1-git-send-email-sjg@chromium.org> References: <1456459256-32643-1-git-send-email-sjg@chromium.org> Message-ID: <1456459256-32643-4-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/arm/cpu/u-boot.lds | 3 +++ arch/x86/cpu/u-boot.lds | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index e148ab7..ebea070 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*); } -- 2.7.0.rc3.207.g0ac5344