Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2163050rwb; Thu, 19 Jan 2023 22:15:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXsg1s54UdmTAnYPgZFUf8HJZnMGmUaEb2ZxY759oE4bpthj/Fl+f8YflTeCtzrCT6ca30Et X-Received: by 2002:a17:906:415:b0:7c1:2e19:ba3f with SMTP id d21-20020a170906041500b007c12e19ba3fmr27776168eja.57.1674195312392; Thu, 19 Jan 2023 22:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674195312; cv=none; d=google.com; s=arc-20160816; b=Rcnf8d+Z6Q2iYIVXOTG57Ct48YUWzE5wpn6tarHAz/fFU66IVG7SMD2Lfbgv0Duth1 95uyeXiljHOdv5DzeMFkQpgcne9ksAYNlGxGryC6oK4qDfSwpXSGNxq5CoXzOK22aTX+ gh/BwNiiEeteHd4//Bl58pgTuPEChmUo60kNY9CspWYBZuZnPjRtMDsBngxFE0u23S9w vtFBjgwGqh8PvKE5SLJdapERbINldigeBplXMuO6kNJGnibFeYwUlhT0QOxOL4NjQ5po AlCN7y3r0ATmvT6YLstbj6u0s159Egge1csXcTxJmeQ7D/zAtmx9VfA4XQ/mlKV5CsPo 0kyg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=C+9ZAgw+4fw6bNVLbsW5ns4qalBtmA+eXZKkThBeVdc=; b=FODDtLPZh/8WBOB2h/9VQSFl+txfE1xKPLTe0E4s85FOfPIHhkhc0jboxjFAfkU6nR wDXSrKvLunri3pJhiIbnxfGOmBNn5/+RXEExxyd4ew6mVMxkMQE6BSnWAbFDPnrQxWrI 1BmFV+ZI8dUbFneJylVojp/6nzKH/KK8x24FgVQ09S8zuYQ4G5sZ/JJZyxPRmtJJMytr Zvw+ArRBYdyfr/cD5qzSRSAfCllely5sPpUh3Efdy2wkpi1A6O8lUajft8oVmzwC/jPP LOa7gy7sdaIVdvXacltwJLOUEtW9+hOeZ1s/r8rFWZ6b62KZNI1FYdSAw3Vh8FA3jqzK 8DsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PHA28sXs; 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 nb27-20020a1709071c9b00b0086e54bcc9b5si19523095ejc.499.2023.01.19.22.15.01; Thu, 19 Jan 2023 22:15:12 -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=PHA28sXs; 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 S231484AbjATF2j (ORCPT + 47 others); Fri, 20 Jan 2023 00:28:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbjATF15 (ORCPT ); Fri, 20 Jan 2023 00:27:57 -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 3DE194DBEF for ; Thu, 19 Jan 2023 21:23:19 -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 5B972B825D2 for ; Thu, 19 Jan 2023 16:04:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 331B2C433D2; Thu, 19 Jan 2023 16:04:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674144276; bh=bLiBD1lcTQlE2apcHhtHrHNRHMGBCYK7pvp8YphbLrY=; h=From:To:Cc:Subject:Date:From; b=PHA28sXsdkIBTt828JLOLw8VtnGqWragwmGlYDnKnko5/DgoZK+PA6pCUy4Ufmm6f Tr+T5k68kXaxP/kjDm0wrK2eTdFARnKvIqjl0EFhhDob5tg867mGpgl1OBwd63DA3M QIKyemxHRzin5DplvVozZ5iXyTOYkcN/Aqbpndb1lW5funuUUor7K9hW2Lt74Cv0mo FffZzwXRA/+sghu21oQ5H0/KqTFSKd0OZRnUFyVpasC1dVhu1wJ0VtXKyvMYvZVDUD zeGo0HdCGKnm62bi5rpqTwmY36e99v73rs4zhOY57h0pomKM7pAHaKp000Ztw7o8G6 hg+/nQyvgnEtA== 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 0/5] riscv: improve link and support ARCH_WANT_LD_ORPHAN_WARN Date: Thu, 19 Jan 2023 23:54:12 +0800 Message-Id: <20230119155417.2600-1-jszhang@kernel.org> X-Mailer: git-send-email 2.38.1 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 This series tries to improve link time handling of riscv: patch1 adds the missing RUNTIME_DISCARD_EXIT as suggested by Masahiro. Similar as other architectures such as x86, arm64 and so on, enable ARCH_WANT_LD_ORPHAN_WARN to enable linker orphan warnings to prevent from missing any new sections in future. So the following two patches are preparation ones, and the last patch finally selects ARCH_WANT_LD_ORPHAN_WARN Since v1: - add one more patch to catch .init.bss from EFI stub Jisheng Zhang (5): riscv: lds: define RUNTIME_DISCARD_EXIT riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols riscv: vmlinux.lds.S: explicitly catch .riscv.attributes sections riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub riscv: select ARCH_WANT_LD_ORPHAN_WARN for !XIP_KERNEL arch/riscv/Kconfig | 1 + arch/riscv/kernel/vmlinux.lds.S | 9 +++++++++ 2 files changed, 10 insertions(+) -- 2.38.1