From patchwork Thu May 16 12:02:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert ARIBAUD X-Patchwork-Id: 244295 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 78FB02C00EE for ; Thu, 16 May 2013 22:04:06 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 526484A032; Thu, 16 May 2013 14:04:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JP6HpxQnZIYi; Thu, 16 May 2013 14:04:03 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5129F4A088; Thu, 16 May 2013 14:03:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B31494A044 for ; Thu, 16 May 2013 14:03:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sfk6O58RjCOO for ; Thu, 16 May 2013 14:03:39 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by theia.denx.de (Postfix) with ESMTP id 3B0314A036 for ; Thu, 16 May 2013 14:03:31 +0200 (CEST) Received: from localhost.localdomain (unknown [IPv6:2a01:e35:2eb9:20:c8e0:ddbb:39e5:11b5]) (Authenticated sender: albert.aribaud) by smtp1-g21.free.fr (Postfix) with ESMTPSA id 51E4C94026C; Thu, 16 May 2013 14:03:25 +0200 (CEST) From: Albert ARIBAUD To: U-Boot Date: Thu, 16 May 2013 14:02:56 +0200 Message-Id: <1368705777-8789-4-git-send-email-albert.u.boot@aribaud.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368705777-8789-3-git-send-email-albert.u.boot@aribaud.net> References: <1368525030-5162-1-git-send-email-albert.u.boot@aribaud.net> <1368705777-8789-1-git-send-email-albert.u.boot@aribaud.net> <1368705777-8789-2-git-send-email-albert.u.boot@aribaud.net> <1368705777-8789-3-git-send-email-albert.u.boot@aribaud.net> Subject: [U-Boot] [PATCH v3 3/4] arm: do not compile relocate_code() for SPL builds X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Albert ARIBAUD --- Changes in v3: - none Changes in v2: - drop all relocate_code instances from SPL builds arch/arm/cpu/arm1136/start.S | 11 +++-------- arch/arm/cpu/arm1176/start.S | 11 +++++------ arch/arm/cpu/arm720t/start.S | 11 +++++------ arch/arm/cpu/arm920t/start.S | 12 +++++------- arch/arm/cpu/arm925t/start.S | 11 +++++------ arch/arm/cpu/arm926ejs/start.S | 11 +++-------- arch/arm/cpu/arm946es/start.S | 11 +++++------ arch/arm/cpu/arm_intcm/start.S | 11 +++++------ arch/arm/cpu/armv7/start.S | 6 ++---- arch/arm/cpu/ixp/start.S | 11 +++++------ arch/arm/cpu/pxa/start.S | 8 ++------ arch/arm/cpu/s3c44b0/start.S | 11 +++++------ arch/arm/cpu/sa1100/start.S | 11 +++++------ 13 files changed, 55 insertions(+), 81 deletions(-) diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index ccea2d5..1eec2e0 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -104,10 +104,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -173,6 +169,7 @@ next: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -195,7 +192,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -233,14 +229,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr -#ifndef CONFIG_SPL_BUILD - +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index f20da8e..3c2a52c 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -112,10 +112,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -225,6 +221,7 @@ skip_tcmdisable: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -247,7 +244,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -285,12 +281,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -298,6 +295,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S index 9facc7e..983f8ad 100644 --- a/arch/arm/cpu/arm720t/start.S +++ b/arch/arm/cpu/arm720t/start.S @@ -101,10 +101,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -155,6 +151,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -177,7 +174,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -215,12 +211,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: mov pc, lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -228,6 +225,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S index 6250025..889329f 100644 --- a/arch/arm/cpu/arm920t/start.S +++ b/arch/arm/cpu/arm920t/start.S @@ -89,10 +89,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -194,6 +190,7 @@ copyex: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -216,7 +213,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -254,12 +250,12 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif - relocate_done: mov pc, lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -267,6 +263,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/arm925t/start.S b/arch/arm/cpu/arm925t/start.S index 021e241..64e8ae5 100644 --- a/arch/arm/cpu/arm925t/start.S +++ b/arch/arm/cpu/arm925t/start.S @@ -95,10 +95,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -184,6 +180,7 @@ poll1: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -206,7 +203,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -244,12 +240,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: mov pc, lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -257,6 +254,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 4c56711..d5c4ab2 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -136,10 +136,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -190,6 +186,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -212,7 +209,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -250,14 +246,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr -#ifndef CONFIG_SPL_BUILD - +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S index 9c2b70d..2fc730c 100644 --- a/arch/arm/cpu/arm946es/start.S +++ b/arch/arm/cpu/arm946es/start.S @@ -105,10 +105,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -159,6 +155,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -181,7 +178,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -219,12 +215,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: mov pc, lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -232,6 +229,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/arm_intcm/start.S b/arch/arm/cpu/arm_intcm/start.S index 5e8c528..c483b53 100644 --- a/arch/arm/cpu/arm_intcm/start.S +++ b/arch/arm/cpu/arm_intcm/start.S @@ -101,10 +101,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -155,6 +151,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -177,7 +174,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -215,12 +211,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -228,6 +225,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index e9e57e6..3ade510 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -94,10 +94,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -231,6 +227,8 @@ relocate_done: bx lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S index 69ef8aa..8458f45 100644 --- a/arch/arm/cpu/ixp/start.S +++ b/arch/arm/cpu/ixp/start.S @@ -114,10 +114,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -257,6 +253,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -279,7 +276,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -317,12 +313,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -330,6 +327,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S index ada91a6..595778a 100644 --- a/arch/arm/cpu/pxa/start.S +++ b/arch/arm/cpu/pxa/start.S @@ -118,10 +118,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -201,7 +197,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -239,12 +234,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: diff --git a/arch/arm/cpu/s3c44b0/start.S b/arch/arm/cpu/s3c44b0/start.S index 7361aa2..33a0a81 100644 --- a/arch/arm/cpu/s3c44b0/start.S +++ b/arch/arm/cpu/s3c44b0/start.S @@ -80,10 +80,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -140,6 +136,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -162,7 +159,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -200,12 +196,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: bx lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -213,6 +210,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: diff --git a/arch/arm/cpu/sa1100/start.S b/arch/arm/cpu/sa1100/start.S index 8a2eafd..e0c45d6 100644 --- a/arch/arm/cpu/sa1100/start.S +++ b/arch/arm/cpu/sa1100/start.S @@ -90,10 +90,6 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start -.globl _image_copy_end_ofs -_image_copy_end_ofs: - .word __image_copy_end - _start - .globl _bss_end_ofs _bss_end_ofs: .word __bss_end - _start @@ -144,6 +140,7 @@ reset: /*------------------------------------------------------------------------------*/ +#ifndef CONFIG_SPL_BUILD /* * void relocate_code(addr_moni) * @@ -166,7 +163,6 @@ copy_loop: cmp r0, r2 /* until source end address [r2] */ blo copy_loop -#ifndef CONFIG_SPL_BUILD /* * fix .rel.dyn relocations */ @@ -204,12 +200,13 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop -#endif relocate_done: mov pc, lr +_image_copy_end_ofs: + .word __image_copy_end - _start _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: @@ -217,6 +214,8 @@ _rel_dyn_end_ofs: _dynsym_start_ofs: .word __dynsym_start - _start +#endif + .globl c_runtime_cpu_setup c_runtime_cpu_setup: