Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2141839rwb; Thu, 19 Jan 2023 21:54:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXti7nOunRjP1UivGHsmg95aC858lDgHoKMAF1eQb4QhAmRCoQy/h1abIq3vTpGuX5ufTsau X-Received: by 2002:a05:6a20:d90e:b0:b8:ae03:4715 with SMTP id jd14-20020a056a20d90e00b000b8ae034715mr17353497pzb.57.1674194050802; Thu, 19 Jan 2023 21:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674194050; cv=none; d=google.com; s=arc-20160816; b=QxWeGPR3HwPd00aFyPvnSGV4pG+m6vqcWwswg4rJF0tADPvFqj+4tGtM8c5clKneKN GzQ8ijDxBZazak+evtd9ghUMdapfL80f/SVUy+YhuHAjYFF+KjmyG0lYrn/TV9RCFs1L iFRuaObjHuDqmPll2QVRROh5jCKziu8Y0F5fBLeU2ejX6Ja9VP65O5bfr5O5WvA4QzHV 1ALs3xL7qDLK6hz6AkH4X2iMMglFZP8RG98u4lA2pA7ULTLTk0A1xRvAxAf3M1rdYuMT tBTTaPROpeM/ny9ssCwd1q+1tHPYuEmUwSz/4ER6f0lp/06z9VpXsgGeOwegnAw/FvzJ 2BRw== 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=lKxEVa8zq8MkwdOM/VNaJyEjEcwyIyhpQdNqAyaRA4A=; b=nKdqsB4W1TrNHn1gJtjg9gWCbR/Wpj5sRzsQllj/KKWzT+dsothjH+z+v09XZ4W1wC vg9+4vx0RLYR47MOZABvfa9P9lWB0b4fecHrPL9fOV339EbNjOyJj2UUGlShdJe/fZM4 2TATw6X6i6FQmeaB/I/5SIf8q9+xR6SJYPPM2yXuUfewr0HFjZUi/GUYJAr57jVl575G qNBU0brrvlheCSWp2m0TM0bb9mvQGtd53q4lHBFCUuF4iNxZ51QXf9+tUTChvqfBk8ir mxqJ9LKjdja6DwlotBMpVjgYwtWL2ldZuemnonNhNvIGKsT87QBcHE341YZVIR8bKryt ohBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Sb/IuKp0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x41-20020a056a0018a900b0058d8d935148si19223703pfh.253.2023.01.19.21.54.04; Thu, 19 Jan 2023 21:54:10 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b="Sb/IuKp0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbjATF3a (ORCPT + 47 others); Fri, 20 Jan 2023 00:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjATF2r (ORCPT ); Fri, 20 Jan 2023 00:28:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B930518C8 for ; Thu, 19 Jan 2023 21:23:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1041AB825CE for ; Thu, 19 Jan 2023 16:04:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08DD0C433D2; Thu, 19 Jan 2023 16:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674144281; bh=JVI55/ivlZ2TxoJHk0X2NO1E9dymbfoLXWzO4tbPtjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sb/IuKp0gRLNHotZEmSEUC5VIcFKvFDct3mmUFbR/RgMiNz4w6hsFeLsqIRKBxs8C SVXmwwejCWXXx9vxIj0okNKj9s9nXgMDRqz8pM/8I/GxVGChP6BGEhZE/0NpaU0OZJ cWnOmQ6gTLwfeU7TLmG8uXy9apHLMCIN3feZd77krFdI3QM7+VTln48Qd4Ahs1o1eJ CQWzdokDLVZw/3ZLwLJAV+Z42Yn3++93GRXVXXzJbr+WmZ8w2fVTpHa1mk/RKUh2YH 8ct/q8JlLqoczfUQ4aTZhYBWCiKj761uH8aPsleUEILO0lJBavjg1fLAxvKgrFvDt8 /NrYA+SchZ3Lg== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Masahiro Yamada , Kees Cook , Nathan Chancellor Cc: Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols Date: Thu, 19 Jan 2023 23:54:14 +0800 Message-Id: <20230119155417.2600-3-jszhang@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119155417.2600-1-jszhang@kernel.org> References: <20230119155417.2600-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 When enabling linker orphan section warning, I got warnings similar as below: riscv64-linux-gnu-ld: warning: orphan section `.rela.text' from `init/main.o' being placed in section `.rela.dyn' Use the approach similar as ARM64 does and declare it in vmlinux.lds.S Signed-off-by: Jisheng Zhang --- arch/riscv/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S index 07c19f2a288c..6a250313b752 100644 --- a/arch/riscv/kernel/vmlinux.lds.S +++ b/arch/riscv/kernel/vmlinux.lds.S @@ -97,6 +97,10 @@ SECTIONS *(.rel.dyn*) } + .rela.dyn : { + *(.rela*) + } + __init_data_end = .; . = ALIGN(8); -- 2.38.1