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 B7131C77B61 for ; Thu, 13 Apr 2023 06:21:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9F70C85EA5; Thu, 13 Apr 2023 08:20:58 +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 A988C85CBD; Thu, 13 Apr 2023 08:20:55 +0200 (CEST) Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) (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 6614785DBB 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: bizesmtp73t1681366834tc79a266 Received: from ubuntu.. ( [111.196.129.125]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 13 Apr 2023 14:20:33 +0800 (CST) X-QQ-SSF: 01200000000000D0F000000A0000000 X-QQ-FEAT: swyrzWPvyR02INOlycq1KTQ0iM64v9lzVWy+vn4U8G4Un1CISWZnLAvxGOm3D 7XzudBmeNyx+kuwD9PGj2/tAroWDx4zSnFNaOR6IyB8c6teqsHOhX1F2ds0O4FSO7bcOZLQ vdAF540L4jJ4aE25qh7WWWjbJXAU4/BNFRW9XxF8bUopZ6CoZaUpLYSMqSWsfv/0wARofm/ KdCFOm7rqr/mSTvG1SAjSwKWZnrhM6CDtFQFFif7ydhv2GO+lIe9CFNkfKNZQLpGy/3Lnis +SslGf4p1xfbN+BUnDUVsJQfpNhxG5Pb9nBQWAMV/tGZXH+KCTIv0DNoeifsfNgW2A0F7i5 XOpinzlVrCnYFgWFl82ADqUmTuCt7VolLM6ySpxxZIF9tQntdU= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 2927532068984970566 From: Bin Meng To: u-boot@lists.denx.de Cc: Andrew Scull , Leo , Rick Chen , Simon Glass Subject: [PATCH v2 9/9] riscv: Update alignment for some sections in linker scripts Date: Thu, 13 Apr 2023 14:20:08 +0800 Message-Id: <20230413062008.981238-9-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 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 --- (no changes since v1) 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