Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1221413rwb; Fri, 28 Jul 2023 06:34:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlHu+K2OPFYxcoozbUDO3ILkOWfJylj0uHIbKicQWkaOT1ZtQxarpuPV56aeFou+s/aZQ3/T X-Received: by 2002:a05:6e02:1c2c:b0:345:d2fe:da92 with SMTP id m12-20020a056e021c2c00b00345d2feda92mr3393856ilh.10.1690551281840; Fri, 28 Jul 2023 06:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690551281; cv=none; d=google.com; s=arc-20160816; b=Qb5cjES2oc9t9egv66oOeNlhiHeT2iSKcFFJLGprIbI+TaV3A0LywEwMiDOVGvxtSf 5gYT9/9pBdML8BbCxFLVXM4xMZsWoKjdkCk1tFFxaCN0f5gwEvDsLJazhDmVZNpqzlqa MCgBU94gh+uPJPx90P4HaSmFvE+f+AP0V0UoqPBbBbIIWuI40ID5nZi1CbHNTuKevfNW WdKyo+CK5GgUlY8/Em2R0aCRK8KzieNG52qiiUXu/vYVqJmu5jmfdhhNkb/DxumU3fna ZcsHycrPL2MPl6grB0ooSB6myXIN4UMxQgh6XAUaqLhHwRObfAiLm28O9+vxK2QxQ09D J2+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7TcuxbE1UmD9Aws4Vk4iwIGKsEWIhL1t3hDINkZP8BM=; fh=RtpAIwSk4HtCjnJAjhdSKYw/ZViT2+pZX74UARwZ86g=; b=YHtEKlPUpKTtIF3+NwDni8NFNMsGH+5OZBwH3aOoFHA+9CDnHy8Ab0BL0bwwnGEpgZ d3ZwGlwxA8PXVQ2vg95wI8GQKCxnD/inzk08F62qWOfWiHS/pW+egSpTjHBqtuPKiFeM rK6v8Aq8uvanHVimcBJ4otRyaqlJpfg4TLzCVU5SbF8LpqoDcgP1filufUKnCettSVC6 M6HVWEGbnLkWHPdHVz78s3b3CjnBI0iZErmw38zPCOy55OX3CAvWVY2yZVP9ArUlo7T1 fpyp9gYZ7PLYDbs8IIqM/9Ve+zsYAJlQCRMx219i3I1znAUbmHCgvKJm9ZsW3KZAlWkf XAbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=MJq+yStd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a17090aad8a00b0025945de4165si3182549pjq.141.2023.07.28.06.34.27; Fri, 28 Jul 2023 06:34:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=MJq+yStd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235151AbjG1M5L (ORCPT + 99 others); Fri, 28 Jul 2023 08:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233660AbjG1M5J (ORCPT ); Fri, 28 Jul 2023 08:57:09 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7369F30FA for ; Fri, 28 Jul 2023 05:57:07 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fe0e34f498so3466547e87.2 for ; Fri, 28 Jul 2023 05:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1690549026; x=1691153826; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7TcuxbE1UmD9Aws4Vk4iwIGKsEWIhL1t3hDINkZP8BM=; b=MJq+yStd64RJULVR6xIyGKMfDvJY/8gPnfCgrWUJ2PGBeiEnLeBY+gxcUgbEZhMYah OOl137jgbX5DbfJSptbCfz75WzP42GHTgJBubqWJI0NfAuQ1YO7OrLLyzsaL+otn0o+P nkdb2Elzr3r+odfHe2sh9YYEDp1TnroP2YkvgHcGQjKjGOProLgadzRBGENGhEJS84Ys SRcPgU3Q4mDBytkFD1slMZEAJMtaQ5QjJ11MPABWQ6zph1XZL9nZVwOnwVPZYVIAHqDG frG6dXdhI57xX7QEE+Ct6rAmW2dENPQfYtjqlOo9lMP5InM6v3WXrkSSHBpmbIAaDPNd Wcyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690549026; x=1691153826; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7TcuxbE1UmD9Aws4Vk4iwIGKsEWIhL1t3hDINkZP8BM=; b=jA68eeL0+Sn2ZACCLyMK9nSsSQFBuqrjw8C+iNSl6kYc3zy0Vzc2+/VWzdUbV+kfhz ZKLQgtXKawI4uA3HXMtkOpsFbQqDh3sxSudS4ClppBVYMVOQ5kUvah8Lkv8f1wmLZjE/ L1Abqha+Zhs2OhuiemNaXwNj/eoKa55Xj+s6Pu6DAjK+l5YyBqdtWhM5PGLBwJG3XhD2 toXp/MBBVS7ehbkLQ/jsOX1dMwIoF3XsmIZ03MfqiLtxBVXonZQu/QsCuFMeYQlpyX39 Z+mtSk40FqevaWOHj+KE0WoKO+KCu6C1dSjRlHh76K5nEdAIyK4ftdjbmE0jOif5IksA i6Fg== X-Gm-Message-State: ABy/qLYj86z6Nin8qxq92nncUAkDSCmZpF6EvHdZ1eWwUj3WwOr9FwdR 04tGUkjdwEPsFMYMiVerMZtIk+AUL+anKhb5vSE= X-Received: by 2002:a05:6512:3d06:b0:4f8:4177:e087 with SMTP id d6-20020a0565123d0600b004f84177e087mr1909770lfv.47.1690549025552; Fri, 28 Jul 2023 05:57:05 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id w16-20020a50fa90000000b0052275deb475sm1774659edr.23.2023.07.28.05.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 05:57:04 -0700 (PDT) Date: Fri, 28 Jul 2023 14:57:03 +0200 From: Andrew Jones To: Jisheng Zhang Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] riscv: vdso.lds.S: merge .data section into .rodata section Message-ID: <20230728-cec389a85a7dc8dcca803e06@orel> References: <20230726173024.3684-1-jszhang@kernel.org> <20230726173024.3684-3-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230726173024.3684-3-jszhang@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 27, 2023 at 01:30:23AM +0800, Jisheng Zhang wrote: > The .data section doesn't need to be separate from .rodata section, > they are both readonly. > > Signed-off-by: Jisheng Zhang > --- > 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.*) Looking at other architectures, it appears the last three lines of sections could be discarded, but I don't know enough about this to state they should be. Thanks, drew > + } > > /* > * 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 >