From patchwork Fri May 13 11:39:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12848701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEEE0C433FE for ; Fri, 13 May 2022 11:42:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379970AbiEMLmT (ORCPT ); Fri, 13 May 2022 07:42:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379962AbiEMLmR (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 703F041611; 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 24DBeEwd008349; Fri, 13 May 2022 20:40:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 24DBeEwd008349 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1652442019; bh=9Q6mTn1bAGbkjgZhALJ6nTHBDHzsRRSkgxWQCfuUF6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=whFtsEspc/QO7yhgWHzcrhF8CSTpr4/K7GubZ1k3pXPHngIOmWX1Bg3G3E9BT4G9r vDeq+KtUyMHJrUQ2RXmTnWl7x4Q0J+gBTbmDWLOXqm0/eyW70pi6CydWhjWMnbTOR5 LXln7JkIpyWBgqy+4Wr14rjvy5vF44LDFeEVCtkFGmP/xVHhoRc0UdKYSFRxQBb6LE tExxXn0tiIRu2Oqt5frj98+5mgfKw4kcHfI+CXZIrle/imk4dKBi0gRMX2Wq2z0kk8 G8xgM/60nUIb5oxj6Onyc4jifXi23ZJ0NxCENT7C4BC2AA3k+g2462IvHOUh5WmF7S iv4XkKxDnM6lw== 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 04/10] genksyms: adjust the output format to modpost Date: Fri, 13 May 2022 20:39:24 +0900 Message-Id: <20220513113930.10488-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Make genksyms output symbol versions in the format modpost expects, so the 'sed' is unneeded. This commit makes *.symversions completely unneeded. I will keep *.symversions in .gitignore and 'make clean' for a while. Otherwise, 'git status' might be surprising. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v2) Changes in v2: - New patch scripts/Makefile.build | 6 ------ scripts/genksyms/genksyms.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index dff9220135c4..461998a2ad2b 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -165,16 +165,10 @@ ifdef CONFIG_MODVERSIONS # o modpost will extract versions from that file and create *.c files that will # be compiled and linked to the kernel and/or modules. -genksyms_format := __crc_\(.*\) = \(.*\); - gen_symversions = \ if $(NM) $@ 2>/dev/null | grep -q __ksymtab; then \ $(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ - > $@.symversions; \ - sed -n 's/$(genksyms_format)/$(pound)SYMVER \1 \2/p' $@.symversions \ >> $(dot-target).cmd; \ - else \ - rm -f $@.symversions; \ fi cmd_gen_symversions_c = $(call gen_symversions,c) diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index 67b23cc0df0f..f5dfdb9d80e9 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c @@ -680,7 +680,7 @@ void export_symbol(const char *name) if (flag_dump_defs) fputs(">\n", debugfile); - printf("__crc_%s = 0x%08lx;\n", name, crc); + printf("#SYMVER %s 0x%08lx\n", name, crc); } }