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 92B0BC761A6 for ; Thu, 30 Mar 2023 12:38:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E51AD860B0; Thu, 30 Mar 2023 14:37:37 +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 DF90F856E5; Thu, 30 Mar 2023 06:21:10 +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 5814D85CD5 for ; Thu, 30 Mar 2023 06:21:04 +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: bizesmtp81t1680150049t6p60y3d Received: from ubuntu.. ( [111.196.129.125]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 30 Mar 2023 12:20:48 +0800 (CST) X-QQ-SSF: 01200000000000D0E000000A0000000 X-QQ-FEAT: 239gR2IZrluBVLKQb/lklCVj1RYzvTVU8L0iQa8df1TxFZQSn94oBDBntreBj lVoK+Bl6lGIhFPsmCrR+nKvFB4tPHOe3uTytZSBgdYstymtbKbxnRM/AiK4wZoUuaJVe/Rg 8nDBVB/wJFs9aTHjFfQ8yquLtgCe3OCBqqToUg0J1e1vTVHME9zdeyio6ED8DLS//rAIxMc HJrKa5IsaB1pnpGxKPyeFbqqjba6HwtmUVA6rTcJGVvjB5Clemyj5m4TSLt2PaRGl6RHZXx ggV2S8by35BejC1XfhN+/tkJWMU7rQQf+btGiYxIed6Y97G60cFMJOS6pJWckPIlbYz3zvb Z2j7EZ+xhnBaqteFFugGUDu1o4AC4uCX2DLd5Ph X-QQ-GoodBg: 0 X-BIZMAIL-ID: 14299712074858170546 From: Bin Meng To: u-boot@lists.denx.de Cc: Andrew Scull , Leo , Rick Chen , Simon Glass Subject: [PATCH 8/8] riscv: Update alignment for some sections in linker scripts Date: Thu, 30 Mar 2023 12:20:24 +0800 Message-Id: <20230330042024.721710-8-bmeng@tinylab.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330042024.721710-1-bmeng@tinylab.org> References: <20230330042024.721710-1-bmeng@tinylab.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvr:qybglogicsvr3 X-Mailman-Approved-At: Thu, 30 Mar 2023 14:36:20 +0200 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 Some sections in the linker scripts are aligned to 4 bytes, which may cause misaligned exception on some platforms, e.g.: clearing the bss section on 64-bit hardware if __bss_start does not start from a naturally 8 bytes aligned address. Signed-off-by: Bin Meng --- arch/riscv/cpu/u-boot-spl.lds | 2 +- arch/riscv/cpu/u-boot.lds | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/riscv/cpu/u-boot-spl.lds b/arch/riscv/cpu/u-boot-spl.lds index c3b4907905..d1113a59aa 100644 --- a/arch/riscv/cpu/u-boot-spl.lds +++ b/arch/riscv/cpu/u-boot-spl.lds @@ -44,7 +44,7 @@ SECTIONS __binman_sym_end = .; } > .spl_mem - . = ALIGN(4); + . = ALIGN(8); _end = .; _image_binary_end = .; diff --git a/arch/riscv/cpu/u-boot.lds b/arch/riscv/cpu/u-boot.lds index 1c937aebee..15b5cbc585 100644 --- a/arch/riscv/cpu/u-boot.lds +++ b/arch/riscv/cpu/u-boot.lds @@ -57,7 +57,7 @@ SECTIONS __efi_runtime_rel_stop = .; } - . = ALIGN(4); + . = ALIGN(8); /DISCARD/ : { *(.rela.plt*) } .rela.dyn : { @@ -66,7 +66,7 @@ SECTIONS __rel_dyn_end = .; } - . = ALIGN(4); + . = ALIGN(8); .dynsym : { __dyn_sym_start = .; @@ -74,7 +74,7 @@ SECTIONS __dyn_sym_end = .; } - . = ALIGN(4); + . = ALIGN(8); _end = .; -- 2.34.1