Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2417273rdb; Tue, 12 Sep 2023 00:42:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IET50arVKwHeNXQlgLk/3qBB+hw7Pcx9y6eZio23agJ5g7YQFGw9lB2gslZZMZPyoSdyOZ1 X-Received: by 2002:a17:902:f682:b0:1c3:83e2:d0a9 with SMTP id l2-20020a170902f68200b001c383e2d0a9mr10867071plg.58.1694504553682; Tue, 12 Sep 2023 00:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694504553; cv=none; d=google.com; s=arc-20160816; b=tUIgL1I6RdXFlyC/IqvnSdBKlM8lybUEk1OQw3NKyXKVbTxNJDfb5ZSLRrDZ91M2oW d+JMaAaqy8+9mfuvxeeAIYvxVrTxClUAcEyZ/lgls1ecRClLi2iBPkJf7U4kiLrvnqDt lPRBh1CRgUSlWEukxzpAhZbbVMidTG11ICOiS1PiH5FQxxJT0PJ/VVKMJ9Pszcbotff5 //rUdBde0JImYIh9Yvz/FOecBorzIzW6u2FwcyimxuDrWTbaD/pwtRI16teEpmb8ATQj qdkfCmu3oSy1Hj1BwWgRGGesY8TaRZ+40VcnrddJJYE1H0gB3Ep1qD3DCR5ls1HRVlpe yX2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1XfaqRdXFXsr7MxVUzMY+tuf6nV2Sx/47QBJdSiJea4=; fh=v9uG8q42dbwxZFukVADsiTq/34E1rTcV7VhoZSEPcQo=; b=BqVcdrquGZKpKTSizsRlyCw7C7sza6dnK8wosxZ4ojTy8QVOhYk28dl7wYpOQlhnkW MAjWR/H/qkdK1mNthUCu4UNWvvmVl/UfPewBncTbmcCUcGu+GFhdHIIXmAl0B0nSa522 1+YWjMNy1dkh+VRq5N0bNjqC39TLQwAFl5U0pPFaJiw/5R1fauLE90RufDhNUQCylySs P4DtAwEPAHNih/TiTrzU1Cgad8gSaxhzqCopCoAG4Ztx7HcFvZI8FG1gC1E1JE6hwaJ4 k++T/mkQrzgqB7P7yxUGYoz7S++I2oqY15n/fG1gFB9rmMf10cue1vNXAjXpSW0xlBuo uYZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CYnnR/il"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id cp1-20020a170902e78100b001c0727658c3si7460049plb.259.2023.09.12.00.42.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 00:42:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CYnnR/il"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id F1A8181CDBAC; Tue, 12 Sep 2023 00:32:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbjILHcX (ORCPT + 99 others); Tue, 12 Sep 2023 03:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231633AbjILHcS (ORCPT ); Tue, 12 Sep 2023 03:32:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E67E710C2 for ; Tue, 12 Sep 2023 00:32:14 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FB7BC433C7; Tue, 12 Sep 2023 07:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694503934; bh=SNTi6EXjRzqklc00AhX/G/qenKAaP0mCu6dWGFTJ448=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CYnnR/ilRkGT4q9ek9ocgu4MaGhNF2mRvrrgfNo2WpDw23NReL/A8pizQ26tmjD7R juAJ6MV424uoVvVVEWzbmY6aadsfMg5z0lVP4QQ2udB0tzQhF3ECWF5GGVggNqSr4B DvxnT/UNemTM9BT2px1Tyxynh18gL12NGGyoXEMASZQlj/r6pHHXbHGMPQb4UTkHL8 0D67ELq1bJ0L0V3JFrLZ6y2RY3SLgVNCZQRV6CEKI76NYH34w4lqEkMoWWp5X90pTZ zOk28jh56mjyvJ7Vxfe21TjDxZkwkdetE6O8V/8P1ZIaCQK176IHagZeRZGFib3lIs TmBOFMQmncTIA== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Andrew Jones , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Emil Renner Berthing Subject: [RESEND PATCH 2/3] riscv: vdso.lds.S: merge .data section into .rodata section Date: Tue, 12 Sep 2023 15:20:14 +0800 Message-Id: <20230912072015.2424-3-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230912072015.2424-1-jszhang@kernel.org> References: <20230912072015.2424-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Sep 2023 00:32:37 -0700 (PDT) X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email The .data section doesn't need to be separate from .rodata section, they are both readonly. Signed-off-by: Jisheng Zhang Tested-by: Emil Renner Berthing --- arch/riscv/kernel/vdso/vdso.lds.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/riscv/kernel/vdso/vdso.lds.S b/arch/riscv/kernel/vdso/vdso.lds.S index d43fd7c7dd11..671aa21769bc 100644 --- a/arch/riscv/kernel/vdso/vdso.lds.S +++ b/arch/riscv/kernel/vdso/vdso.lds.S @@ -29,7 +29,13 @@ SECTIONS .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr .eh_frame : { KEEP (*(.eh_frame)) } :text - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata : { + *(.rodata .rodata.* .gnu.linkonce.r.*) + *(.got.plt) *(.got) + *(.data .data.* .gnu.linkonce.d.*) + *(.dynbss) + *(.bss .bss.* .gnu.linkonce.b.*) + } /* * This linker script is used both with -r and with -shared. @@ -44,13 +50,6 @@ SECTIONS .alternative : { *(.alternative) } - - .data : { - *(.got.plt) *(.got) - *(.data .data.* .gnu.linkonce.d.*) - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - } } /* -- 2.40.1