Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8229BC77B61 for ; Thu, 13 Apr 2023 06:22:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4739485EF6; Thu, 13 Apr 2023 08:21:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinylab.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id AAFC485ECA; Thu, 13 Apr 2023 08:20:58 +0200 (CEST) Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F200685E05 for ; Thu, 13 Apr 2023 08:20:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinylab.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng@tinylab.org X-QQ-mid: bizesmtp73t1681366831tlu50x7y Received: from ubuntu.. ( [111.196.129.125]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 13 Apr 2023 14:20:30 +0800 (CST) X-QQ-SSF: 01200000000000D0F000000A0000000 X-QQ-FEAT: ILHsT53NKPgcnl4Vcce4EBgxtSVWmzTT/Qp7r5OmKCRSQOuTBAmPMLljMLev8 ePHZ6ocZU+yOj8Oh/BTJtvMr/4HHyFXwVVRf0tm2H5eFiruoCppGqevGmfQzkG3ik7XEa/p XfOHzzy6tE0EweQ4VHFwSQ27SXJEPpFiVhYmRcMwr9HFVRYrD2nOmiJydyPnbGlLNjYUoNa fmAHdNphIVzHn/3LC1Yjl9VVdG3gTLtaI+c6mfLJ8AIy7SBrxk6Wnax20SG4bPcXSUbNhps hOA7jWAEmkGYWr4CrEoZttWqb5DPZPrlFEtHLo00OfhLDkxktR2+cWDirVqdlGN0zBRA6AY 1sSrrifbl3Lggu0eXlNuQP4nPut1JvMs6jODx97THaEHYmXQzE= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4269328773424373577 From: Bin Meng To: u-boot@lists.denx.de Cc: Andrew Scull , Leo , Nikita Shubin , Rick Chen , Simon Glass Subject: [PATCH v2 8/9] riscv: spl: Remove relocation sections Date: Thu, 13 Apr 2023 14:20:07 +0800 Message-Id: <20230413062008.981238-8-bmeng@tinylab.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230413062008.981238-1-bmeng@tinylab.org> References: <20230413062008.981238-1-bmeng@tinylab.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz7a-0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean U-Boot SPL is not relocable. Drop these relocation sections. Signed-off-by: Bin Meng --- Changes in v2: - fix SPL build error arch/riscv/cpu/start.S | 2 ++ arch/riscv/cpu/u-boot-spl.lds | 25 ------------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 8cf25bb14a..dad22bfea8 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -253,6 +253,7 @@ spl_call_board_init_r: j board_init_r #endif +#if !defined(CONFIG_SPL_BUILD) /* * void relocate_code(addr_sp, gd, addr_moni) * @@ -400,6 +401,7 @@ call_board_init_r: * jump to it ... */ jr t4 /* jump to board_init_r() */ +#endif /* !defined(CONFIG_SPL_BUILD) */ #if CONFIG_IS_ENABLED(SMP) hart_out_of_bounds_loop: diff --git a/arch/riscv/cpu/u-boot-spl.lds b/arch/riscv/cpu/u-boot-spl.lds index 993536302a..c3b4907905 100644 --- a/arch/riscv/cpu/u-boot-spl.lds +++ b/arch/riscv/cpu/u-boot-spl.lds @@ -32,14 +32,6 @@ SECTIONS } > .spl_mem . = ALIGN(4); - .got : { - __got_start = .; - *(.got.plt) *(.got) - __got_end = .; - } > .spl_mem - - . = ALIGN(4); - __u_boot_list : { KEEP(*(SORT(__u_boot_list*))); } > .spl_mem @@ -54,23 +46,6 @@ SECTIONS . = ALIGN(4); - /DISCARD/ : { *(.rela.plt*) } - .rela.dyn : { - __rel_dyn_start = .; - *(.rela*) - __rel_dyn_end = .; - } > .spl_mem - - . = ALIGN(4); - - .dynsym : { - __dyn_sym_start = .; - *(.dynsym) - __dyn_sym_end = .; - } > .spl_mem - - . = ALIGN(4); - _end = .; _image_binary_end = .; -- 2.34.1