Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5370446rwd; Wed, 24 May 2023 00:16:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5bFsybj5T4nJupiT2zz6RBjXZj2ONxflPVfjXBVGvkNnZh6o7YHmLSiw703fHYmjFCeAnf X-Received: by 2002:a17:90b:b18:b0:252:e7dd:4703 with SMTP id bf24-20020a17090b0b1800b00252e7dd4703mr15277550pjb.43.1684912564446; Wed, 24 May 2023 00:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684912564; cv=none; d=google.com; s=arc-20160816; b=QJrUl+ejvoMm+LY4O/5PGdgrLVoQ53wPQhU98jJBSmTupZmQwH8YztGtKYnfb75Avr riLneqdyiAG1k/pnT1dmnSiVbnDLFja3E66dQtbLTZ1osPMbgVYhmA8tjs83HM6HKoGB Saa0Im6V1/bbSHi/qYb+j4cPSFHXHgbyIPWYo1TsUswe6spiLzoXlMgKwGA3GzsPmZIw 5XoDfr46Vbsn0XlVq1PRs3gvfAf8UQ72iD6V7F7gFo9fpj/pzIlzaLigmtyux+AXgb7W U/4TmSNpmuGXAeiSFXb6V2gw84tCHxwhcRSQ8VsnSP+NhIUZcoeiKSaPm3YBn4prDVhQ iY4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2OaUTp4ZRQUOY55Yg1WPlf0hn1iqC3dU2Mbi8zTI3/k=; b=BddZXH1hcqe7jrD6HHEIEpI9YmPmCx2X6LWcEqIwdjG++GWaRCuY54ohNIpyS0xKr/ PmIAvtJBhualXnl68jQ1raGJaEwDojbzpf7XQA8ITq1GqTp3y39yX5wj7kSRbPPyHeyi PvJRgz/Y7+iZ09/f0RKH3G2qBi6Qh62e7IGzxB/ocggI10+0YclvgP9bWIDcYIOr5aTB /J4apSNVZ3EjNhqq5iWVecOmdXpaPA/M6Gvoa/3tpk7X1QcOPYR30582Psie+jHAEwG3 KJ6lvo23zhUZiJuJwwKG8HllTz5Y+HZah8HIBruQOdyaKovV5nCZOTMg82UT5rvSmnLU WEKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lX2m2yIk; 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 h6-20020a17090a604600b002524da9db57si789194pjm.172.2023.05.24.00.15.49; Wed, 24 May 2023 00:16:04 -0700 (PDT) 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=@infradead.org header.s=bombadil.20210309 header.b=lX2m2yIk; 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 S239852AbjEXHDh (ORCPT + 99 others); Wed, 24 May 2023 03:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239850AbjEXHCo (ORCPT ); Wed, 24 May 2023 03:02:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8883BE58; Wed, 24 May 2023 00:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2OaUTp4ZRQUOY55Yg1WPlf0hn1iqC3dU2Mbi8zTI3/k=; b=lX2m2yIkItEs056NYHTBAHhZj8 QVvxDU0NrO9dwxgF77pA3pAWrRQ0zDCJKP4xdyXYUW9/MYTojGN6Ke/rZTwxaBFWtCaLT/D9AsAEr NbnKuGNH2AUaCKxPk/IA6GnNsfYCTbY/G4pjZyFT4j/DtbLSt2tyugy3AAg8Zv5Mu+V2+p6qn0E7l v+ZG8LiWsNELPqhyR53dCFmFN1J7oumkL4wWzPM67dE70NyGq7IsSJkQw+z+D5lz6L5clmxFycZ+U dSfdrhkLuF8oA+uVwnvM8DWbXRR0lfjNpoR6H2eHF6IN5WYSka3WR4Vu0EjSOSLAB3uTpSOt3qH4F lKtZ4Kww==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1iW0-00CYa4-1R; Wed, 24 May 2023 07:02:32 +0000 Date: Wed, 24 May 2023 00:02:32 -0700 From: Luis Chamberlain To: Allen Webb Cc: "linux-modules@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , gregkh@linuxfoundation.org, christophe.leroy@csgroup.eu, nick.alcock@oracle.com Subject: Re: [PATCH v10 08/11] build: Add modules.builtin.alias Message-ID: References: <20221219204619.2205248-1-allenwebb@google.com> <20230406190030.968972-1-allenwebb@google.com> <20230406190030.968972-9-allenwebb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406190030.968972-9-allenwebb@google.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Thu, Apr 06, 2023 at 02:00:27PM -0500, Allen Webb wrote: > Generate modules.builtin.alias using modpost and install it with the > modules. Why? This is probably one of the more important commits and the commit log is pretty slim. > Signed-off-by: Allen Webb > --- > .gitignore | 1 + > Makefile | 1 + > scripts/Makefile.modpost | 15 +++++++++++++++ > 3 files changed, 17 insertions(+) > > diff --git a/.gitignore b/.gitignore > index 13a7f08a3d73..ddaa622bddac 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -71,6 +71,7 @@ modules.order > /System.map > /Module.markers > /modules.builtin > +/modules.builtin.alias > /modules.builtin.modinfo > /modules.nsdeps > > diff --git a/Makefile b/Makefile > index a2c310df2145..43dcc1ea5fcf 100644 > --- a/Makefile > +++ b/Makefile > @@ -1578,6 +1578,7 @@ __modinst_pre: > fi > @sed 's:^\(.*\)\.o$$:kernel/\1.ko:' modules.order > $(MODLIB)/modules.order > @cp -f modules.builtin $(MODLIB)/ > + @cp -f modules.builtin.alias $(MODLIB)/ > @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/ > > endif # CONFIG_MODULES > diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost > index 0980c58d8afc..e3ecc17a7a19 100644 > --- a/scripts/Makefile.modpost > +++ b/scripts/Makefile.modpost > @@ -15,6 +15,7 @@ > # 2) modpost is then used to > # 3) create one .mod.c file per module > # 4) create one Module.symvers file with CRC for all exported symbols > +# 5) create modules.builtin.alias the aliases for built-in modules Does everyone want that file? > # Step 3 is used to place certain information in the module's ELF > # section, including information such as: > @@ -63,6 +64,20 @@ modpost-args += -T $(MODORDER) > modpost-deps += $(MODORDER) > endif > > +ifneq ($(wildcard vmlinux.o),) > +output-builtin.alias := modules.builtin.alias > +modpost-args += -b .modules.builtin.alias.in > +.modules.builtin.alias.in: $(output-symdump) > + @# Building $(output-symdump) generates .modules.builtin.alias.in as a > + @# side effect. > + @[ -e $@ ] || $(MODPOST) -b .modules.builtin.alias.in vmlinux.o Does using -b create a delay in builds ? What is the effect on build time on a typical 4-core or 8-core build? Does everyone want it? Should we add a new option which lets people decide if they want this at build time or not? Luis > + > +$(output-builtin.alias): .modules.builtin.alias.in > + sort -o $@ $^ > + > +__modpost: $(output-builtin.alias) > +endif > + > ifeq ($(KBUILD_EXTMOD),) > > # Generate the list of in-tree objects in vmlinux > -- > 2.39.2 >