From patchwork Sun May 24 15:42:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11567491 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27E65159A for ; Sun, 24 May 2020 15:44:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 051FE20787 for ; Sun, 24 May 2020 15:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590335097; bh=GEn50ZqSj70RL5+2LuZKVFCwXcmdPQISzM7/zU2Po98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HJ2sM9J5Fr0VPM3joeUmMjljyruHzjCFlNmwuA7exEH6sYVRV5PP9WYXQb2cBwsm0 qn5k5U7teimt2cfcALcoXDAMTSm3wuMfal9vyKfwkbKsOMHmNvy+4Eh0bBOgMG3uRx PfadKsH8k7zUzviI+Q/lmHyJYEFbTtFAYh16kibo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbgEXPo4 (ORCPT ); Sun, 24 May 2020 11:44:56 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:19699 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728393AbgEXPnX (ORCPT ); Sun, 24 May 2020 11:43:23 -0400 Received: from oscar.flets-west.jp (softbank126090202047.bbtec.net [126.90.202.47]) (authenticated) by conuserg-09.nifty.com with ESMTP id 04OFgcUu017561; Mon, 25 May 2020 00:42:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 04OFgcUu017561 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1590334964; bh=+QWobT3EgOenGYNYTgdtjHSb52oUpu7V4hA//icuG9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LCZpQj+XxTMvU3MjtmUECGGNNIxeSv+7S41E1+thOGFHCAjrl+LDHccMrt7kd1LsX xDriAvGwaa6UP5Ko/cNYsgzPMS+beH3qK2FrCekTeS469WT9852QuIHZdFR2IhifEX VQhWh44ZBawRWmu5+b9nyWQs4/tbtcdagBey/YBFC2EqV3oucsWTBUAC+7GHYezwq7 qHhie8eC5wetyo+79mrQ++ZsaAkAvCKddgt2gpglpRZH3fRQ6oo0H7eY80GvT35Lin 2joGskQDUPXAL6uRJ7W+hHcKKibn5DGac0OttWrKQP795+g1KXrAgJmYS1728BEWdZ RhpsFBhrK+MZg== X-Nifty-SrcIP: [126.90.202.47] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 11/29] modpost: pass -N option only for modules modpost Date: Mon, 25 May 2020 00:42:17 +0900 Message-Id: <20200524154235.380482-12-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200524154235.380482-1-masahiroy@kernel.org> References: <20200524154235.380482-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The built-in only code is not required to have MODULE_IMPORT_NS() to use symbols. So, the namespace is not checked for vmlinux(.o). Do not pass the meaningless -N option to the first pass of modpost. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.modpost | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index da7730a43819..bc5561aedb24 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -53,7 +53,6 @@ MODPOST = scripts/mod/modpost \ $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ - $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ $(if $(KBUILD_MODPOST_WARN),-w) ifdef MODPOST_VMLINUX @@ -66,7 +65,9 @@ __modpost: else +# modpost options for modules (both in-kernel and external) MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s \ + $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) ifeq ($(KBUILD_EXTMOD),)