Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4836289iob; Mon, 9 May 2022 02:48:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA+1g3XIKfBZDrI9aO2U12X+5B2IPJyM3vsVbYpzb+vfk8nHOEAYjfmDqLyvezagdrDWfV X-Received: by 2002:a17:90a:e7c3:b0:1dc:5d85:9fd0 with SMTP id kb3-20020a17090ae7c300b001dc5d859fd0mr17664265pjb.168.1652089720061; Mon, 09 May 2022 02:48:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652089720; cv=none; d=google.com; s=arc-20160816; b=Knj2tXGrFaJi3ZnjAD1ePUXN3KK3yjxaE5UslbKtKCFm8XsABm2fbTun6ieY9FC5Yr HCz8CLQOPWIatVH+MdacVVKBv0M/u2wiO1C4ss1IZFvikhBCpw6W+cWcKduWL9fNdxiq EhqIcVr9kaeg/IfKn43a3iKRhsie1YjReM1HCI2z1ebBqwCI+zZstNgQgEJcI48K9wJO L6qF00nj6K2gxd6/mzXbGzI3tthM9iC0Baq9C6tOnv39GCEIpW5BQYtxtWQ+0JGLTJun zFLTKlsQrQQQprdEPrWWMjGdt2TGQJ3LIj38N8f5iicAmIiqzWgIfgjGsbQUDVllKZ0+ Mp9g== 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:dkim-filter; bh=+vYUwETkJzeHMTCZ91mKcqrVUk+DZUgc4qJxVJGLB84=; b=fWx7cgT/9CitKY4sZ11wHwVT5nsJZa1auIORuz5hG1IQqAzDIDMI3HOacYvI876i9Z TrGlUiMFdzzHXrY4/4s9OjRUOptt0xXsje/bE6b5HAvZVsiThOM83bBKw9SoDtwwzVzs izDEj8JFYCY5YuBGntOD1/SbdAUuTPrq70CIQhtG9Vho3dTzMHpKYcM3yqUNPmrqNQTG U0TyOwiE0AH/tj5C08P3RdqABOq1jLqs363ldycSbkoiGkkDE9LfVFyQ2j9BjkkOQzAv Q6vneZtBhDA/+gN2JM+sJFJb99I/uRtVl0fnAnszgJiwAEcd+K9LGtWC9PcpXAc8FB+I KIzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=F4LJf0iz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k65-20020a628444000000b004faa79d798bsi9509616pfd.27.2022.05.09.02.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:48:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=F4LJf0iz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 9F69A224695; Mon, 9 May 2022 02:33:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbiEHTWQ (ORCPT + 99 others); Sun, 8 May 2022 15:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbiEHTPy (ORCPT ); Sun, 8 May 2022 15:15:54 -0400 Received: from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35C7312AC7; Sun, 8 May 2022 12:11:12 -0700 (PDT) Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-09.nifty.com with ESMTP id 248J8qSN030019; Mon, 9 May 2022 04:08:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 248J8qSN030019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1652036933; bh=+vYUwETkJzeHMTCZ91mKcqrVUk+DZUgc4qJxVJGLB84=; h=From:To:Cc:Subject:Date:From; b=F4LJf0izMBoQwKKxFHapf/UWVkpce+bBOiPQDjYdwhGn4tjnhTYWvzVVqkcyPq804 wDV3dj2VXzZ3nUn50spW30wo44yeinntn/zLBECDNy+HKuo4c5WjW594yBUMLi9HJT wh0d+02rTX2YFYjP5EQT1idNsaC0NZxLKCzsyElUxjIq91/u5NWViltNUAbCDr/fI1 c4RsAMtN7VODeWSApmkeeIwtBppqcGR83Ocb9ZjcSCDL6dvRZ/T1gTzeJUi+3NL62D i3XLkjzJPLGGjjGT9pziJq2TeZyq+C4VDoadGLSYb3U3a6/WRGfI2AjWqpDZg7phzF 89WOSAQW+ZG/A== 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, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, clang-built-linux@googlegroups.com, Ard Biesheuvel , Sami Tolvanen , Masahiro Yamada Subject: [PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h) Date: Mon, 9 May 2022 04:06:17 +0900 Message-Id: <20220508190631.2386038-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 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 This is the third batch of cleanups in this development cycle. Major changes in v4: - Move static EXPORT_SYMBOL check to a script - Some refactoring Major changes in v3: - Generate symbol CRCs as C code, and remove CONFIG_MODULE_REL_CRCS. Major changes in v2: - V1 did not work with CONFIG_MODULE_REL_CRCS. I fixed this for v2. - Reflect some review comments in v1 - Refactor the code more - Avoid too long argument error Masahiro Yamada (14): modpost: remove left-over cross_compile declaration modpost: change the license of EXPORT_SYMBOL to bool type modpost: split the section mismatch checks into section-check.c modpost: add sym_find_with_module() helper modpost: extract symbol versions from *.cmd files kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS kbuild: stop merging *.symversions genksyms: adjust the output format to modpost kbuild: do not create *.prelink.o for Clang LTO or IBT kbuild: check static EXPORT_SYMBOL* by script instead of modpost kbuild: make built-in.a rule robust against too long argument error kbuild: make *.mod rule robust against too long argument error kbuild: add cmd_and_savecmd macro kbuild: rebuild multi-object modules when objtool is updated arch/powerpc/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/um/Kconfig | 1 - include/asm-generic/export.h | 22 +- include/linux/export-internal.h | 16 + include/linux/export.h | 30 +- init/Kconfig | 4 - kernel/module.c | 10 +- scripts/Kbuild.include | 10 +- scripts/Makefile.build | 134 +-- scripts/Makefile.lib | 7 - scripts/Makefile.modfinal | 5 +- scripts/Makefile.modpost | 9 +- scripts/check-local-export | 48 + scripts/genksyms/genksyms.c | 18 +- scripts/link-vmlinux.sh | 33 +- scripts/mod/Makefile | 2 +- scripts/mod/modpost.c | 1499 ++++--------------------------- scripts/mod/modpost.h | 35 +- scripts/mod/section-check.c | 1222 +++++++++++++++++++++++++ 20 files changed, 1551 insertions(+), 1556 deletions(-) create mode 100644 include/linux/export-internal.h create mode 100755 scripts/check-local-export create mode 100644 scripts/mod/section-check.c -- 2.32.0