Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2169115rwb; Thu, 19 Jan 2023 22:21:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRhIlodAPSyztkkOyTXWVzv7AXhXCYlsvW8ck8jQADgG+sNKBO7YofIaHSDM8FZnqSkZBS X-Received: by 2002:a17:906:3f87:b0:844:d342:3566 with SMTP id b7-20020a1709063f8700b00844d3423566mr13644517ejj.22.1674195702408; Thu, 19 Jan 2023 22:21:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674195702; cv=none; d=google.com; s=arc-20160816; b=WvSA9TDg78SJ+sSX4pQoeTMSbr3TfvmAXzot8A6LWx7f8hTOI/bnMRRN34nQLsHHw5 TetZ1++IgD3+FGizENEt2SBzackoEOxc0uxmC0hM2C2ZYSL9War4Z8NUrhLBZVem2gyq /FPI8Y22nouWjeeMEarSB9HgP113Ujs7TINKvT9FwhQO5RRb2t1GA1geCHp77/bvdzPb 02ZEs80jlC5lqChRcFzfFDJ7z8RnGboL6P/AizaOwFTQzwyfpPzfbNuQQGEoRoEJIhFA z2k9ilPPaWM5xpg2tw4rW6TA0E0S+Q6grwPQpY37kIMhuZVvhR+UQRCgDA74jbNoyovn RizQ== 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=SZhqcGf8LaD+KBnNTKVyLBH5XNQAt8nNlASMr5XCLYY=; b=P6BHxfjuE/3O7JnBzdqSanwriEagE7ZVhlcJc+VuL5LB4mSYt29+Xre56f+hkjfNPz 7QEArouKZ9781oU30Inhk94iABDzSb8yTHFNjb8TPFFuowZROBJZWv4OAbUh4xDaCOr+ KZ9uGnuG+r3tF0yUq27zm9o7RRzkFQt36AZODO6tlNVe9dAxSSkfqK0mPJo/s5QH2Hwh 0NswOLraZFgE4rU7fP2nOXvQ6rY3TATzLDvCOu1ZC9sx4u1iBowK7bJ9jF+RWe7UzMRn Uz/3xympwSSVJH1R12HmhAkVsTrHazc5Hzh8KzIHGpG0RqVynqenfGlvrLhm6S+m/Bmr sGmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I2M7OjAv; 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 ji6-20020a170907980600b00866bd1c81e9si35284193ejc.419.2023.01.19.22.21.30; Thu, 19 Jan 2023 22:21:42 -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=I2M7OjAv; 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 S230047AbjATFaI (ORCPT + 47 others); Fri, 20 Jan 2023 00:30:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230321AbjATF3O (ORCPT ); Fri, 20 Jan 2023 00:29:14 -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 23D8672C12 for ; Thu, 19 Jan 2023 21:23:56 -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 2ADBDB825D1 for ; Thu, 19 Jan 2023 16:04:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2773FC433EF; Thu, 19 Jan 2023 16:04:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674144285; bh=pK9Wljug0Rn52ySou16paWAQsJuCdZT50slSKiioR6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I2M7OjAvb5J/bLEAc1b32Jtbukywae8404syAwBYwhKyD3JPidlY3A/Es8gJ9BQAu Qp3p/b4rqgs8vNq/1frbEJyI3+RM1MtOo9DD/VCKW2lRBqscBhmIZpxiSHWL2aY4Pw RdH4jlK74S/mq0YVuTN1YkdGZzaCjh8SJmPJyJkqoidzKDfoxrLjAhOxPLwnmmwJ9V a3b/giUqbhV9myKXy0jPD8f6ZNFRvNZw9GTjnogGUilLxlvCG3/kvhLhBy79ECywzy XiMevmoyYtgRE3B/EnERlqPBLQH5PPSmaelHe/isPHMXpPMzdRh02oY/k0x3sc7Y4L Jqvc86erhRayw== 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 4/5] riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub Date: Thu, 19 Jan 2023 23:54:16 +0800 Message-Id: <20230119155417.2600-5-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: ld.lld: warning: ./drivers/firmware/efi/libstub/lib.a(efi-stub-helper.stub.o):(.init.bss) is being placed in '.init.bss' Catch the sections so that we can enable linker orphan section warning. Signed-off-by: Jisheng Zhang --- arch/riscv/kernel/vmlinux.lds.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S index 7eb3d25d0dae..b2813b5e47a0 100644 --- a/arch/riscv/kernel/vmlinux.lds.S +++ b/arch/riscv/kernel/vmlinux.lds.S @@ -87,6 +87,9 @@ SECTIONS /* Start of init data section */ __init_data_begin = .; INIT_DATA_SECTION(16) + .init.bss : { + *(.init.bss) /* from the EFI stub */ + } .exit.data : { EXIT_DATA -- 2.38.1