Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1034631iob; Fri, 13 May 2022 20:27:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFuIToY6hBW7KB4+PZg8QguLr4HgBvFAlZKgmjqGLXmwAvOq+SIahwjaeW68Z7R9ovx414 X-Received: by 2002:adf:d014:0:b0:20c:e053:d02c with SMTP id t20-20020adfd014000000b0020ce053d02cmr4259618wrh.191.1652498877305; Fri, 13 May 2022 20:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652498877; cv=none; d=google.com; s=arc-20160816; b=AKWMB4Az6l0IwM0QPoVCqeD5caGeKxve0K7hRytFGyNJeMXae6NE3o3zIWIp/9hJuQ sl/xyI2b6RyBk1wEMjtcaZVBvf2E+TEqweZS7SOhIs+dLfxu/WvYgx5dty7d8BrjSx+/ TIKfdM2QjaHgzMu4DsLZ+e3eOitWQvSo9kvOEPIEVx1R9cWwmfrqGn/RneN20tcNYrSV wR+0Du2LvZEjjsUFx3C3TnKXOpSxh8ciSP/9EozIIL4uye+f+ByM6xNq3reboG6KBdG3 burdwng5Hg8V61KYZ/9FUQOhyvq+wE3jK+LVGM9X7hp64AnrXk7tQgGoFOBwLnlnmVVu feZQ== 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:dkim-filter; bh=cga2j3/RnX95UXo6+4HyPv/WWKGxfQZ0xpYK4BVs9G8=; b=D6OSRo5JG4uXlSUs6ID4uaFpeZSDoa5gRjQtuM4iYHiBmHW/+W1ziQLvAlnG1dG3Ev biI5uSRI7fHLnxTrAtI7FGspiDzRaTpJmmWDWMvUk9J8UXjzj4+VVj2yWXFW0fFKrcWl u8jI2Rba+kc00qFdzzsQfXebWLVlvy6mvlW0EuFSLAH01YZAcTPCauwN5GMm7AXxb28G iAycUlk4z7YA7knYOEg9x6mhHyNiqmVcoxnl1dEOhGC27YkpE1vrdlTJspv3No9FAsdq n7VN5kNKjJX0p5HQ8jZwGdG0bxcai7/GdPsc/2EiqJ5UZO7DjufPiGpZh8Bq7gPFm51r SoYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=p5ftmnST; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v6-20020adfebc6000000b0020612177d85si3465024wrn.85.2022.05.13.20.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:27:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=p5ftmnST; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CF6ED41A229; Fri, 13 May 2022 17:05:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380025AbiEMLm6 (ORCPT + 99 others); Fri, 13 May 2022 07:42:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379963AbiEMLmR (ORCPT ); Fri, 13 May 2022 07:42:17 -0400 Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1041453A50; Fri, 13 May 2022 04:42:13 -0700 (PDT) Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-07.nifty.com with ESMTP id 24DBeEwc008349; Fri, 13 May 2022 20:40:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 24DBeEwc008349 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1652442018; bh=cga2j3/RnX95UXo6+4HyPv/WWKGxfQZ0xpYK4BVs9G8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p5ftmnST03FxjYRjjdJDBeXs1RhWVX7sEj20o6h2lFkAVs15LD1gYUdS+kWEJMdL5 MLb11fpAipT++S44EFXq3/PS6tTfaBrqtn75TgVO0yORnZoqj8I4topwBsyynYgYr2 MkT68Pxjy0ae+j/tZcpYGZzPmFuB7yVd4ulEip6sX2Zm9V8OyvUtoe7/7rN1gBovqk sYlkruGLARitLMDo/zZwMuqKEUQfPksHfRv7c5VxaRH5iTO6CJUy+hxYw2VAPlDWZY TJQE0xnYgcTEsNQF+b8WM9Sr6xPJSG7QP1df1B1kifECu8jVFRo8s6fCEBE4PxdR2c aXWgWnQ/ledng== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Peter Zijlstra , linux-modules@vger.kernel.org, llvm@lists.linux.dev, Ard Biesheuvel , Sami Tolvanen , Masahiro Yamada Subject: [PATCH v6 03/10] kbuild: stop merging *.symversions Date: Fri, 13 May 2022 20:39:23 +0900 Message-Id: <20220513113930.10488-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220513113930.10488-1-masahiroy@kernel.org> References: <20220513113930.10488-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Now modpost reads symbol versions from .*.cmd files. The merged *.symversions are no longer needed. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v1) scripts/Makefile.build | 21 ++------------------- scripts/link-vmlinux.sh | 19 ------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index ddd9080fc028..dff9220135c4 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -390,17 +390,6 @@ $(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler $(subdir-builtin): $(obj)/%/built-in.a: $(obj)/% ; $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ; -# combine symversions for later processing -ifeq ($(CONFIG_LTO_CLANG) $(CONFIG_MODVERSIONS),y y) - cmd_update_lto_symversions = \ - rm -f $@.symversions \ - $(foreach n, $(filter-out FORCE,$^), \ - $(if $(shell test -s $(n).symversions && echo y), \ - ; cat $(n).symversions >> $@.symversions)) -else - cmd_update_lto_symversions = echo >/dev/null -endif - # # Rule to compile a set of .o files into one .a file (without symbol table) # @@ -408,11 +397,8 @@ endif quiet_cmd_ar_builtin = AR $@ cmd_ar_builtin = rm -f $@; $(AR) cDPrST $@ $(real-prereqs) -quiet_cmd_ar_and_symver = AR $@ - cmd_ar_and_symver = $(cmd_update_lto_symversions); $(cmd_ar_builtin) - $(obj)/built-in.a: $(real-obj-y) FORCE - $(call if_changed,ar_and_symver) + $(call if_changed,ar_builtin) # # Rule to create modules.order file @@ -432,16 +418,13 @@ $(obj)/modules.order: $(obj-m) FORCE # # Rule to compile a set of .o files into one .a file (with symbol table) # -quiet_cmd_ar_lib = AR $@ - cmd_ar_lib = $(cmd_update_lto_symversions); $(cmd_ar) $(obj)/lib.a: $(lib-y) FORCE - $(call if_changed,ar_lib) + $(call if_changed,ar) ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),) quiet_cmd_link_multi-m = AR [M] $@ cmd_link_multi-m = \ - $(cmd_update_lto_symversions); \ rm -f $@; \ $(AR) cDPrsT $@ @$(patsubst %.o,%.mod,$@) else diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 7313cbd755df..47e5336d0c75 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -56,20 +56,6 @@ gen_initcalls() > .tmp_initcalls.lds } -# If CONFIG_LTO_CLANG is selected, collect generated symbol versions into -# .tmp_symversions.lds -gen_symversions() -{ - info GEN .tmp_symversions.lds - rm -f .tmp_symversions.lds - - for o in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do - if [ -f ${o}.symversions ]; then - cat ${o}.symversions >> .tmp_symversions.lds - fi - done -} - # Link of vmlinux.o used for section mismatch analysis # ${1} output file modpost_link() @@ -88,10 +74,6 @@ modpost_link() gen_initcalls lds="-T .tmp_initcalls.lds" - if is_enabled CONFIG_MODVERSIONS; then - gen_symversions - fi - # This might take a while, so indicate that we're doing # an LTO link info LTO ${1} @@ -307,7 +289,6 @@ cleanup() rm -f .btf.* rm -f .tmp_System.map rm -f .tmp_initcalls.lds - rm -f .tmp_symversions.lds rm -f .tmp_vmlinux* rm -f System.map rm -f vmlinux -- 2.32.0