]> git.sur5r.net Git - u-boot/commitdiff
arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled
authorSimon Glass <sjg@chromium.org>
Mon, 14 Mar 2016 01:07:29 +0000 (19:07 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 22 Mar 2016 16:16:09 +0000 (12:16 -0400)
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>
arch/arm/cpu/u-boot.lds
arch/x86/cpu/u-boot.lds

index 13aa4fa48814f6da575e9ed53ff94be74d4a833d..cfab8b0412344a1f0d7467d461c15d45c162b9fe 100644 (file)
@@ -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
index b0d8531a605743cca554a00bfe6ccc762476e8a4..36f59ea96db8663b9f44b7dd4a1acfc0a86635f4 100644 (file)
@@ -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*); }