From patchwork Fri Dec 8 05:07:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13484812 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="dRn8muui"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="TkjhGhVG" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20804A3; Thu, 7 Dec 2023 21:09:48 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B82TpIW021176; Fri, 8 Dec 2023 05:09:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=b7V4jM80a5YZ5rjhUwTfKSxgUKjp9SsS2oJaBa/C77s=; b=dRn8muuir3NK0qndcV3RXPAhVPizOOxjqfqeUq9KpA8tV474nFdk3yBKZzjjMC8Nzd+N F+YnKQh919m7SMqZnE/s7x7rqXT9wRYHhpKTTs7KUfk6qzKwiacZSXIoPfMVVLoqQOjW XT/zEhKdeoMJvd9gcdA8LyjmWqJu3zyL7O74XGFf11CV7KqOY72OPw/VNDz+lW0eP4Qh mJK+RYWsvRi+nQ2IqoTwMkU9P7mPTIdYUIX9jy9YuYKY/v5Ry//Q4LVyaPpiyRc5ahBb 6lhtLtyhZrt09omOFYEoY/r6Op8+d4r12DtvQwydkeDD00qr6h14Fw8onJwNUcg+xbgV Gw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3utdmbnd34-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:09:38 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84RHq7040287; Fri, 8 Dec 2023 05:09:37 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2041.outbound.protection.outlook.com [104.47.57.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3utanef1wn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:09:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDPYGz/bbsP+jma+durDL6zwyUUD4/VYfaUhThb11I6LJfsRTOSGvIvDijvx55m273U6JfF9MbPRSlz4vQNAKrPod5VWOSeexQxYAp1SJ7Mdv6AQ0rCN8z1JGna2jWJ7HAqnocZ7gsrMqIVFuOdO6r3htuDktuqAiyDD+05LjXUgtSsxPC40idAnrPhPzm2qi6tFdOgccF9UWmgi+C0PihtT2vghHk5RpdHdyogaIBcsUt9QF96s+ZSJ7OULZ/acxILl9rOoYh3c3TRdXVKExyal/aUOeX6kLR1NNjd/JJGNaOJakeYPSdtLHGEy62J3iUmpGLbZzRZHGft9DZjJ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=b7V4jM80a5YZ5rjhUwTfKSxgUKjp9SsS2oJaBa/C77s=; b=IW1Vi4j9yPxfSAmZmhnz0rYSqJfKUkz/ogIAEQssw3/UBOCrdJxBfvyWoOZLvDH8dQdSA6+bSOXy/g0EZI3bK1RbAL6/W6j7Yn69GdFbTMeEEAiiwJhVcARgBvI/cC/bvyIHd7muekJ8fZvhyC39UgsVVdYlMNra7B2ljy2fGOujIrcdAKpg/K6YZKuIgI3OpbIODQE163vUuZ8xiquZB6CKh3gvfg7d+m77u5+9mlrUJ0TSTjUFgvhWtGRUujc6jgt2jdu3U+vVF6eTh7K2Y0gtGGwn1bhcDLwfdk+RxdF93KrmvhhqUeCSuL6BmPm5xBTfYW21YtGY9rH/K8dDbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b7V4jM80a5YZ5rjhUwTfKSxgUKjp9SsS2oJaBa/C77s=; b=TkjhGhVG7Cxt0V40vm/weFaoOVz7ChejcZs5iGLdKwxgdPBS2uA9ae+9FvqQmChZ6F5wX3xqQ47J9EDOkQTgaZPFIiIHmJWUdqk1QNHXVYgC0qZv7OFF/cdoJsH8OzMCdRUWAJklq+iFLtuTo8BNQEdQODVr8bsrFUrSLRB95Hw= Received: from SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) by BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 05:09:35 +0000 Received: from SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0]) by SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0%7]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 05:09:34 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Luis Chamberlain , Nick Alcock , Kris Van Hees , Steven Rostedt , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa Subject: [PATCH 1/6] kbuild: add modules.builtin.objs Date: Fri, 8 Dec 2023 00:07:47 -0500 Message-ID: <20231208050752.2787575-2-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208050752.2787575-1-kris.van.hees@oracle.com> References: <20231208050752.2787575-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BYAPR07CA0019.namprd07.prod.outlook.com (2603:10b6:a02:bc::32) To SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB2975:EE_|BLAPR10MB5316:EE_ X-MS-Office365-Filtering-Correlation-Id: fbe2e076-12ff-4c00-a3a3-08dbf7abde86 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ir2T41DtqNrhzhTmRy6Td53bSjLeCoY7iUL2chvE+Wri59vt4aTNKO1O0hftMovrNxJPd+Ok9/qYapErgXdJ2Y0OyX5LfuzocsZae+SKCBJiW+YTW/74kEmCzx34E4iLghkb776Rr+ZG80+lK60c2VqIuP6pe2PBPvbRevB4WQhaM4lgkn0d6W6m1PlC120NhN7SDQsUhY5psOHT6HWg69qzntxfc10t6OA9aifmQCxxvM6Sp+QCA5XNHQtpnFONr2Wc9A/Q4HvGzrg02vPIGtsriL3n8bn5eyp3PEaXk2mpD9ttgBuTGwaUXb77IDh0jk9axD+eYpvK1pnBorBBtBoLk2FH0/CD7fgLV58/a4cEL0G7Oa/NDUegpSxc+MowF01F4ftldHOHpmROlFYrqM1zjpPzMG+FAqtLDcLsNw2BVptJzeYdn5eBQiJwdLqf6dOozd1V+i7NYI01bdK7qCb4ZtJk8h5GhAkQwEVvb6en4OmsM3qpgVtZu8Pjd4p59K5C1W4rxzFnrMMDNcsRsGFgTbnThsI28fg34QWwqKOijf/z7GPRePmtCqwqSWnG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB2975.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(376002)(39860400002)(136003)(346002)(366004)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(6486002)(478600001)(66556008)(66476007)(54906003)(66946007)(38100700002)(6512007)(83380400001)(26005)(316002)(6666004)(6506007)(2616005)(1076003)(2906002)(8936002)(8676002)(86362001)(4326008)(5660300002)(103116003)(36756003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Tkbtj/cU6CbbfPNNT4Jcgs0NhSiP1mWGjy6v6fBvZ3StdZfR70ZhbzK3UJxhGe0cs82Qn76z+YkFs8HoLrT+yaEQ6Xw+QV1zbOfp3QO4zMto9LoUfXcwacIpeQRsBogCFbjXtwRHUlQxxVmPgIz5onbrur7+dh1vojVeY/8BbR/4ktHlXfaifxcn2WtXOEa5rRN42bdbqxAfmvu1e8E8luMCqU5Mp081uY1/ZWQby8vi9pjPE0gA6BUzf+pOGNI3r/1T+BQ8DlvOQvWudwdOjvzl1NsUODv5+UuY9T7+tl8joR4Qnk9bROTFmQVYoyaCzRY+6INQlC9o6n9KGFYzk0SWi5KeogsqJqWED1jLVZu3DuXTcq/T9qIq8IOohXiYXo+hGbmo7LlYj3NZzc2jQOKJS/L+wWRQ0zs6519dCwKBA5c/u8fj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KB17/L1VZkcMjja7K X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbe2e076-12ff-4c00-a3a3-08dbf7abde86 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB2975.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 05:09:34.8923 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fT9529/qqZbgGGi43laRrGd7/o2jARYcKMNQlFNk5jIsxv5dEn4dIZEeWNGLNIJmBMYS/pWXNTOJXhVQUOk7rRkk2fpxDdLK2QQghZ3/9t8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5316 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080038 X-Proofpoint-ORIG-GUID: Doqn6yQAvo371WcmbsYRRLRzMeZbAY3p X-Proofpoint-GUID: Doqn6yQAvo371WcmbsYRRLRzMeZbAY3p From: Luis Chamberlain The file modules.builtin names all modules that are built into the kernel; this is checked by modprobe to not fail when trying to load something built-in. But for tools which want to see which object files make up each module, we want to help them with such a mapping as it is not easy to get this otherwise. We do this by just extending scripts/Makefile.lib with a new variable and define to capture all object files included in this module, store it in a new objs= modinfo stanza, then extract it just before linking into a new file modules.builtin.objs with a layout roughly modelled on a makefile: path/to/module.o: path/to/constituent.o path/to/other-constituent.o Single-file built-in modules get a line reading path/to/module.o: Note that the .modinfo section is discarded at the link stage, so the kernel is not bloated at all (see include/asm-generic/vmlinux.lds.h). Orabug: 29891866 Signed-off-by: Luis Chamberlain Signed-off-by: Nick Alcock Reviewed-by: Nick Alcock Reviewed-by: Kris Van Hees --- .gitignore | 2 +- Documentation/dontdiff | 2 +- Documentation/kbuild/kbuild.rst | 5 +++++ Makefile | 8 ++++++-- include/linux/module.h | 4 +++- scripts/Makefile.lib | 5 ++++- scripts/Makefile.modinst | 6 +++--- scripts/Makefile.vmlinux_o | 15 ++++++++++++++- 8 files changed, 37 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 0bbae167bf93..7e3a0a1556a5 100644 --- a/.gitignore +++ b/.gitignore @@ -68,7 +68,7 @@ modules.order /System.map /Module.markers /modules.builtin -/modules.builtin.modinfo +/modules.builtin.* /modules.nsdeps # diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 3c399f132e2d..75b9655e5791 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff @@ -179,7 +179,7 @@ mkutf8data modpost modules-only.symvers modules.builtin -modules.builtin.modinfo +modules.builtin.* modules.nsdeps modules.order modversions.h* diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst index bd906407e307..15d1b61d9454 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -17,6 +17,11 @@ modules.builtin This file lists all modules that are built into the kernel. This is used by modprobe to not fail when trying to load something builtin. +modules.builtin.objs +----------------------- +This file contains object mapping of modules that are built into the kernel +to their corresponding object files used to build the module. + modules.builtin.modinfo ----------------------- This file contains modinfo from all modules that are built into the kernel. diff --git a/Makefile b/Makefile index cbe63ba9126e..7e48618771dd 100644 --- a/Makefile +++ b/Makefile @@ -1145,7 +1145,11 @@ PHONY += vmlinux_o vmlinux_o: vmlinux.a $(KBUILD_VMLINUX_LIBS) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux_o -vmlinux.o modules.builtin.modinfo modules.builtin: vmlinux_o +MODULES_BUILTIN := modules.builtin.modinfo +MODULES_BUILTIN += modules.builtin +MODULES_BUILTIN += modules.builtin.objs + +vmlinux.o $(MODULES_BUILTIN): vmlinux_o @: PHONY += vmlinux @@ -1473,7 +1477,7 @@ endif # CONFIG_MODULES # Directories & files removed with 'make clean' CLEAN_FILES += vmlinux.symvers modules-only.symvers \ - modules.builtin modules.builtin.modinfo modules.nsdeps \ + modules.builtin modules.builtin.* modules.nsdeps \ compile_commands.json .thinlto-cache rust/test \ rust-project.json .vmlinux.objs .vmlinux.export.c diff --git a/include/linux/module.h b/include/linux/module.h index a98e188cf37b..53323e94b96e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -180,7 +180,9 @@ extern void cleanup_module(void); #ifdef MODULE #define MODULE_FILE #else -#define MODULE_FILE MODULE_INFO(file, KBUILD_MODFILE); +#define MODULE_FILE \ + MODULE_INFO(file, KBUILD_MODFILE); \ + MODULE_INFO(objs, KBUILD_MODOBJS); #endif /* diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 68d0134bdbf9..40803f8faa5e 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -112,6 +112,8 @@ modname-multi = $(sort $(foreach m,$(multi-obj-ym),\ __modname = $(or $(modname-multi),$(basetarget)) modname = $(subst $(space),:,$(__modname)) +modname-objs = $($(modname)-objs) $($(modname)-y) $($(modname)-Y) +modname-objs-prefixed = $(sort $(strip $(addprefix $(obj)/, $(modname-objs)))) modfile = $(addprefix $(obj)/,$(__modname)) # target with $(obj)/ and its suffix stripped @@ -125,7 +127,8 @@ name-fix = $(call stringify,$(call name-fix-token,$1)) basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget)) modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname)) \ -D__KBUILD_MODNAME=kmod_$(call name-fix-token,$(modname)) -modfile_flags = -DKBUILD_MODFILE=$(call stringify,$(modfile)) +modfile_flags = -DKBUILD_MODFILE=$(call stringify,$(modfile)) \ + -DKBUILD_MODOBJS=$(call stringify,$(modfile).o:$(subst $(space),|,$(modname-objs-prefixed))) _c_flags = $(filter-out $(CFLAGS_REMOVE_$(target-stem).o), \ $(filter-out $(ccflags-remove-y), \ diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index 0afd75472679..b45586aa1de4 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -30,10 +30,10 @@ $(MODLIB)/modules.order: modules.order FORCE quiet_cmd_install_modorder = INSTALL $@ cmd_install_modorder = sed 's:^\(.*\)\.o$$:kernel/\1.ko:' $< > $@ -# Install modules.builtin(.modinfo) even when CONFIG_MODULES is disabled. -install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo) +# Install modules.builtin(.modinfo,.objs) even when CONFIG_MODULES is disabled. +install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.objs) -$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo): $(MODLIB)/%: % FORCE +$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.objs): $(MODLIB)/%: % FORCE $(call cmd,install) endif diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index 25b3b587d37c..bfb84efcef39 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only PHONY := __default -__default: vmlinux.o modules.builtin.modinfo modules.builtin +__default: vmlinux.o modules.builtin.modinfo modules.builtin modules.builtin.objs include include/config/auto.conf include $(srctree)/scripts/Kbuild.include @@ -87,6 +87,19 @@ targets += modules.builtin modules.builtin: modules.builtin.modinfo FORCE $(call if_changed,modules_builtin) +# module.builtin.objs +# --------------------------------------------------------------------------- +quiet_cmd_modules_builtin_objs = GEN $@ + cmd_modules_builtin_objs = \ + tr '\0' '\n' < $< | \ + sed -n 's/^[[:alnum:]:_]*\.objs=//p' | \ + tr ' ' '\n' | uniq | sed -e 's|:|: |' -e 's:|: :g' | \ + tr -s ' ' > $@ + +targets += modules.builtin.objs +modules.builtin.objs: modules.builtin.modinfo FORCE + $(call if_changed,modules_builtin_objs) + # Add FORCE to the prequisites of a target to force it to be always rebuilt. # --------------------------------------------------------------------------- From patchwork Fri Dec 8 05:07:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13484813 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="i+hm6Lj/"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="IqW+dSEH" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22AA21BC7; Thu, 7 Dec 2023 21:11:02 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84jCvp011957; Fri, 8 Dec 2023 05:10:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=pCZpbXKYSsFrdNYrx05pQZdYkoqRPai4gZRDRdPIohA=; b=i+hm6Lj/XS4EuU8vtmwBfP8EKF288IsYMY7dZ8MxOJCVK9A40n3D8/T/YYoT1DjV+wlE E2q9p8rK9ECCgbAx8EXbkYTELzCLf8Bi7lmOgJXso2jywZXf9Wl18aO+RfHwm3I4mRl8 ptty90ZdjD9M96Z3nopeSWsjCsRj2AN4Ycz+YbpdY0Y1dwknvBKghVy86OEfsTVnV1mQ mW4vYlmCMew2nlunthM7i5mnnRD91XvS8lO22d3LDLOOBlJDYuf6dqwC1Twetrgl2Ay2 gHWgObf2aXpapEIYPQuO4BQzBiYFbOyHiIgDcd6p1OtFgQkOaeUkeOwf+UM1KGJwO+hd sg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3utd0mn90k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:10:55 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84R2TK016958; Fri, 8 Dec 2023 05:10:55 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3utan75x4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:10:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DXKMPCWPp37fvt4w9eMCDB7mJVxHm6oWzIh10pA2Q1ETuWFZ6ubE614W+iyLRqa4kn714byqlYiSKTzyoOlUE1j2ZPITd5D9l1QniwbEhIQPu1c0I/bOrhNTLdDufQSxNWRKwKq/4nVsnDdr9o+HDrN6KfBEFilb01qSUfBBqAJS9CQxA+J1hr9mM2fR9yR6yXf1gNmvuUoxfDlUrPVhlIrpp/Oj4qTLfAibNJrE8zowrvd6c6aLNOyDYUGor3FhWIeyJbQkRQgc48SPTTYbufvD6DEWWk20DFHzh+30Bu83SH8IhhjuCRYw+h2r71Uh/L8Lh3OQVzyUqPYISeHNtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pCZpbXKYSsFrdNYrx05pQZdYkoqRPai4gZRDRdPIohA=; b=LTkTrulr7eLa/1KoIzKlxwxnRrN0z0avaV2vorgjpLoh6uumanJtWKuZ938fJzdJBbtlN8jlTtWjBiZeC0mQPmziFwW8v79RLiLn8Em89VhntSguRDcLjZsZTKXQpxaAys6I8s4aDFEhuyYMPiG7ADCYbMJ1N5YGfqPgNamn16llrlFI6geU1ZIlnZSZ9S9MXQAF4c8l3KTarZH4cgfimShuw6BOhvb125850ypCMStp/9spoCgRSSIuQYxoS8gmSeWNfwZZ1p5bYOSc/UlD4xV3F0QvHN968mLRKCd0P5UQ0ev+Wjv+1IdflxBzxvl8UURtgDJI7wEZ9sTatXJG/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pCZpbXKYSsFrdNYrx05pQZdYkoqRPai4gZRDRdPIohA=; b=IqW+dSEHAuZAzOQFc5/fpxIOfIeR6mGKq3B6XOEX52gJcp7vxNPjxZSd8rxeqXuqNgNDiFb6j8oLPXK37tZG65TiHnzb+jkWqHD/7wQWM0g4C25boP+MXRFx8paArDUQAnLVoszYVpxjHWka/qzxVDOOvmxgD0wCa6MH2bqcNaE= Received: from SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) by BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 05:10:52 +0000 Received: from SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0]) by SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0%7]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 05:10:52 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Alan Maguire , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa Subject: [PATCH 2/6] module: add CONFIG_BUILTIN_RANGES option Date: Fri, 8 Dec 2023 00:07:48 -0500 Message-ID: <20231208050752.2787575-3-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208050752.2787575-1-kris.van.hees@oracle.com> References: <20231208050752.2787575-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR02CA0017.namprd02.prod.outlook.com (2603:10b6:208:fc::30) To SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB2975:EE_|BLAPR10MB5316:EE_ X-MS-Office365-Filtering-Correlation-Id: eaaf2d45-33fe-4caf-809c-08dbf7ac0cc6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RX4JyULxhMUtqkcEoPGWPXfNgOEup03XIrP6Lscu693jj3EGpOwIK7iMo977mUc8HmTkNwGr8SVkZFJbrdOz5SIdrd3pXpzsNSod6ZjZsXW5Fr38B0BbGfK8UT5jsM+Qx9XRQcrGZkPsONu4VXImi5ILuhbWwm8R9j2Q3IOIzXEqS76N9j55w/BsG6KCMkGBoM4YLm6EK6NtFAEZsu34SzBPg679XX/vsvbgnIdJfICAgtrHrLQznENYOZmEtkll9OvhvJFy7hTLVM4ZWFBpTgnZXyICHnnW+dIyON65MqO0n0GVQcXh7EsEVfGPHd8P7o1bKL9Qro0BBGUrHHEd1QU8kE4R4ssxcyJWRCXTGLGQKDzlQQH/me7DD0aTf+LSTaT7jbzUzLTaEaU35tCDFypUBgzEfh9uSFAq9snbWA8DK7B9YUmTVh6AwDW6bYt6yz9HKKYBaWtTz3UfswWXvSYT8Cn79M/uI3EWINRHrTJp5ZNY/JjjYBidw/Ox3uDRN2P7Xt/7oTpK2vLMMtmO2elDT0f+apcj2hkvhtL+8+Mwg6QGHjMCyFuG9bGJ5VcZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB2975.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(376002)(39860400002)(136003)(346002)(366004)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(6486002)(478600001)(66556008)(66476007)(54906003)(66946007)(38100700002)(6512007)(26005)(316002)(6666004)(6506007)(2616005)(1076003)(2906002)(8936002)(8676002)(86362001)(4326008)(5660300002)(103116003)(36756003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: g9xM8f4XE+8kcMNSjwksTVg5/MXtzowzEbb+ME0t3bsR2drz4XsusK3IEmdclKb+dCkXQDauhspUS5ZMs/EcNhbPCKjt9797RWVVSI/CqaMK4xdK2grbIshoveEH475cYFmU27IwHptuG20bVRCspGdBC/ZLRxSf304Ur+D2WOHf+IQ/WAP198JtTOflrDVR9i0ECeZJQ9ErNES9uebgGQRK6GyLlO12mwAsIZEAzKQbqtvjFmh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r5mL1O6zFO/ldnMieVtjHrkhbqVE905bkzyeD4iDk3ffwvK0xSvKKL3SyCoTBbNMVVSdEg33fVsDml0oDjIpF1S30qshBcZV6B0iK7CKyhwd252JNnsRMev0BuMwLD7qBmgn/pmaQ9RfbbCO9gnQdIPDfg/iTD7TiiNJ6Cml9hLDzh2bP3HYd0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: eaaf2d45-33fe-4caf-809c-08dbf7ac0cc6 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB2975.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 05:10:52.4780 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AnBcQWJkEeXvzxPcCBfZh+sJ3HY12hy8ERFhKLeoM7SwwrkIwvwl2KIhj4RRBCB6/WqPaTq/PVqU8lMx464DPRd+KwXHAPnzA7rrQEXaatg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5316 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080038 X-Proofpoint-GUID: xRO5OL__Yd41Ds2rc9qu-voo4RjUHP7E X-Proofpoint-ORIG-GUID: xRO5OL__Yd41Ds2rc9qu-voo4RjUHP7E The CONFIG_BUILTIN_RANGES option controls whether offset range data is generated for kernel modules that are built into the kernel image. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock Reviewed-by: Alan Maguire --- kernel/module/Kconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig index 33a2e991f608..0798439b11ac 100644 --- a/kernel/module/Kconfig +++ b/kernel/module/Kconfig @@ -389,4 +389,21 @@ config MODULES_TREE_LOOKUP def_bool y depends on PERF_EVENTS || TRACING || CFI_CLANG +config BUILTIN_RANGES + bool "Generate address range information for builtin modules" + depends on VMLINUX_MAP + help + When modules are built into the kernel, there will be no module name + associated with its symbols in /proc/kallsyms. Tracers may want to + identify symbols by module name and symbol name regardless of whether + the module is configured as loadable or not. + + This option generates modules.builtin.ranges in the build tree with + offset ranges (per ELF section) for the module(s) they belong to. + It also records an anchor symbol to determine the load address of the + section. + + It is fully compatible with CONFIG_RANDOMIZE_BASE and similar late- + address-modification options. + endif # MODULES From patchwork Fri Dec 8 05:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13484814 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="hwf3UPQd"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="WtQbxuq+" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099F61729; Thu, 7 Dec 2023 21:12:17 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B82fWMN000448; Fri, 8 Dec 2023 05:11:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=6ARSjib6yqzossKjmNlVRIb13i1DqVdFKeCdUj/UnLQ=; b=hwf3UPQd90VNNkeL5lems1SxKjDQ0E0NPUTHHCujDBmwGYMZAW1PmxwBpXp3kHjhufJz D6vdKYtaVvws9VZf+KONzUQ7MgNUUm9+WER0l4J2o2ums0UAmrpnIxeiIn1BuJI+/9ub 1z8qpDSodWN2bURcX0AZ/MvuMEcT8wA2mH58ZGjeE2D12nA0Ij4eQO50NopNvVZ+w85I wweanWAWi1gwdgbEDRHlNEWGw1RrVrfMrrxwvi5u8vEej7O00amv96OABbqTGEmoeQfR EsKxKvDkQdCR/8bVffz1+J0+lR/rAVZ671rEGHRqs99SBWKlzl049+GS+CUWgS6smxc/ eg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3utdabw6fm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:11:46 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84PJfd037455; Fri, 8 Dec 2023 05:11:45 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2040.outbound.protection.outlook.com [104.47.57.40]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3utan8efgy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:11:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bkdzQ54hDmvoUT+1dSH5PrK22zX0NjdJfX8y+r5o8Qz7YJQ16KGfZg5o0CzjTCCXlMQrWSyk5E6cwRUyk+J71jbPFaFA/Nh1idLZlWcp0BvPgJpvfMt9Dhxty1BPWzr/IRgP6PLF+QJQ41TcK9L63rIzhHRCDIbLUGT7Dz96CzxyX+/vIBgPQHUD7P38/AGR49TH5zXKA3pMzmM+UvKOV5EOCpholP5zrBHAlCTM0ikWzWE59D5TYF3Cty8ebdwc5HMVROs/rt/kjOQMzOGUfeEiOkpdNbrtPdgGaDcBFKVhRtUjYj9wxw90zFy1N+NdrWXHHchC3On1v8d0CYBKgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6ARSjib6yqzossKjmNlVRIb13i1DqVdFKeCdUj/UnLQ=; b=JHoyPJaY9CTZ/BvnmA6vkNv77XwWYlnqsty/9vTYXpudWokLlKPtaQeezb4ZS7rcLvcxuhiBei3hpGSMcgBGPHZMb4V9wVzux2NuN3pOHSux8Qlcd+LWEVoKR0BHNWMW8ofwUUc8IQ6V4pk5ke+BqmP2apzHO7naUZ3p0Nz3m+a9zusMTmvxt93XlmH9dtAgKYWEkXJFwacIORsY+22NsJ/jnLPAuNAuhPSG1WX3qD5+ByYC9zM2eQS6JuXEFVBAU0jkQiM6myrAnOO08huXDunvWuPdOpw4YW/D690EdgF9g/oDXds9ybaRjdh2flQQFp4ScJB4tNJNuztDa1ol1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6ARSjib6yqzossKjmNlVRIb13i1DqVdFKeCdUj/UnLQ=; b=WtQbxuq+8zdbhuKl3PzrLIHBLH06ca/oRoAlmYaX5nqZxuJIbUF37t2+nKn7eYEqSQ3OHk3OVBbHjFiVdD35/Lwz+88tcW29xoxHDv9/Di4fBR6bJQhPTl9qrK7XQ/IBkpcqeujvK4F9dNJqPs+oIQSjBXkWanZ0KsVZfkHToc4= Received: from SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) by BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.28; Fri, 8 Dec 2023 05:11:43 +0000 Received: from SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0]) by SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0%7]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 05:11:43 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa Subject: [PATCH 3/6] kbuild: generate a linker map for vmlinux.o Date: Fri, 8 Dec 2023 00:07:49 -0500 Message-ID: <20231208050752.2787575-4-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208050752.2787575-1-kris.van.hees@oracle.com> References: <20231208050752.2787575-1-kris.van.hees@oracle.com> X-ClientProxiedBy: SJ0PR03CA0241.namprd03.prod.outlook.com (2603:10b6:a03:3a0::6) To SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB2975:EE_|BLAPR10MB5316:EE_ X-MS-Office365-Filtering-Correlation-Id: 54287107-f3d9-42c9-2d11-08dbf7ac2b1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AK60n9p18VAvZ9Z0ct3CYwmAJWv6lPqO4BpQd6n16/F76+PHa93L9Cw3IlRVwYMLJR21HVo99HRLtAAo+5LXLHJadY/vz7f/+EjEkuSp+FKTcIcwegvVr3dRi7YvfEey+EQ+i7AvIbgNpFFv1RMDH96ASSUrZ23Lzz5pWSnktFidPmDaxKBqWyagCjIa4Hl2j6FkwkYg4Q1NRcNq2kyS5ygju4KQhccKOXNA8yyrwy//2uGrtrrUBahO7dcwlpkWJ7y/uoK2rtbxs11C2q2PrW/ymtMePs5gu81vyLyxa57gbvQ+yfNqSNui2EKwsVt8aAX37b38WRfDZcOrWCyqJDGfNtGJGkX59vm/Qt+f4WD2PhAUj3Va9QZQnX3yUvEmNXcsNv77Xk3QULo5itLKP0d/7uz+VrAMR32qGh69WZZIUz26PQjE7fRDDvWWRzHmAtIQbenAufTLtU3RrEbFpdczy4CP9B4FmyIkMuV+Q/YTzdUxG8z9jWyEoMV+6fZ8hGxS+5fR18jxpV/xvicLGUF5DU99UUc87143w/LMyLpPtMhgGc0eJKUg4grbOG9e X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB2975.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(376002)(39860400002)(136003)(346002)(366004)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(6486002)(478600001)(66556008)(66476007)(54906003)(66946007)(38100700002)(6512007)(26005)(316002)(6506007)(2616005)(1076003)(2906002)(8936002)(8676002)(86362001)(4326008)(5660300002)(103116003)(36756003)(41300700001);DIR:OUT;SFP:1101;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/HgRVVVBKNMz35J2T7IJapGDFBdVqZZ/Sqn5G6j/2xZ50Fjc23DOAPAlM+NhuuBHK1/fdRVbGjVR2buDVLRf3+NT9WRzeNVRUriB2w+ktsI9vrkbVr3B3ao+2rm2b8560OsHHAbJuGVRydnvFdpqJZ+gvP8a5ZV1jRnPS00m9fYuPyRm7+lPXga+uQPhe/bI07jW28bmGXs5LEhWRexwWDDo9nJiZzOiCUndgOAr56KKQVtznsvqSYO/OoCmYitDj1MKHpNYfNfDAPNqtf7c5aC65rDekluF+qHd9mSZZ3JCtzeG1lMeE1lhm4VoJ05GjJPcqAp3zJ7ZN5cp+3Ingym6XFEznOBZVIXtQYMNNbBC2eeXXym7b6TTmXQNscrz36/akmD3sHUK8mCSb36khOH6lx0RyWeAmIwQlUysElqCEY1c1EdkrykHNZ2Dpw59Jm5QpFyNkiWyxe0isrt2jJ5VXJrQaeaRIFwv/ X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54287107-f3d9-42c9-2d11-08dbf7ac2b1e X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB2975.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 05:11:43.3732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 83Slb0J/yZC3mcxreUN0+FXbKGLPiRHYX3QMbF2MwykNv43TtX2+VnsLeXS3IQhBWBqd+TtyAiafUEuUx4UP4ZPXDP1z/7HjsNoX5mJYXio= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5316 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080038 X-Proofpoint-ORIG-GUID: ren_IUvTaxd3WHG9thAsW5G7zbcgekLp X-Proofpoint-GUID: ren_IUvTaxd3WHG9thAsW5G7zbcgekLp When CONFIG_BUILTIN_RANGES is set, a linker map for vmlinux.o needs to be generated. The generation of offset range data for builtin modules depends on that linker map to know what offsets in an ELF section belong to an object file for a particular builtin module. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- scripts/Makefile.vmlinux_o | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index bfb84efcef39..9e35cb0ed862 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -45,9 +45,12 @@ objtool-args = $(vmlinux-objtool-args-y) --link # Link of vmlinux.o used for section mismatch analysis # --------------------------------------------------------------------------- +vmlinux-o-ld-args-$(CONFIG_BUILTIN_RANGES) += -Map=$@.map + quiet_cmd_ld_vmlinux.o = LD $@ cmd_ld_vmlinux.o = \ $(LD) ${KBUILD_LDFLAGS} -r -o $@ \ + $(vmlinux-o-ld-args-y) \ $(addprefix -T , $(initcalls-lds)) \ --whole-archive vmlinux.a --no-whole-archive \ --start-group $(KBUILD_VMLINUX_LIBS) --end-group \ From patchwork Fri Dec 8 05:07:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13484822 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="PGACs8eg"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Q3cbliML" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAFFD10F1; Thu, 7 Dec 2023 21:20:17 -0800 (PST) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B8501UN014431; Fri, 8 Dec 2023 05:20:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=UD+nqGjl5Y7jj+YWbLy2EcIUg7eOdOBwh0D2z5TSUIA=; b=PGACs8egVMEsakbqVwJCw99cvk73A9jCqG/fshM7DIdlzL+UxNyM3Ey6LejUIFPRYUUl UBmBgtWR5GNkX2n0bsdCi2o//F/pkdZZz0FAav7KCuaVA5WRyCklRiP9X17Z1btzotHR hMPz6zpYOOqkb3yaCaFMXS1Xp+q30beNzyZTMjZnQVpSw2TW2WWVVjHrPBGB7ecD8rmo 2G8tfk72CDvLFHC9/aZpHE5gxui23FL/oYlUNseAf6BOGw9MRne1noTfXDzc8NXH9g06 mKDOKE432EtDRcUQHNccmvIaXQrPhJ7qtpW1leFoH4W492ydh1TqJtH4LwU3L/BGvWyz vQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3utd0hn8b7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:20:10 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84VWRD038005; Fri, 8 Dec 2023 05:20:09 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3utan8ened-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:20:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jbMDOVSxGbkxoSmL7/o7ZyDZRWNIl70cR7ufYo7D+Wve0lEqy/OlxKeUfUPgqzr3W7Q2dmBFe/3YhfFzvtL6KWYpJkZ2fNDj40pIzPl6+f1t8ip7GoxsbAzi8rZxQsWHHu+afRsb8Bw/QC7B2N7t8qH7Uv4KjPc6VsxcbsaCVATw3cGCd4cRZpRGvsYaL2BFEdse1xECrrum7ydcFIL/F4m3NPfw8+f7t+cNCe1FtwhQA0JiM3EpgEbCD7hRVdfeaLJD+SXB6TiOdKBTAQCvmoNSFhx5JLkxBbs7hQ3aTvXzCkLt/Y7kh50ORVInwo2G4IvZHkdCChRcZ+tX4TNgWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UD+nqGjl5Y7jj+YWbLy2EcIUg7eOdOBwh0D2z5TSUIA=; b=LXxQM5YdfkV3QH4QzZjZTZ9okwysSqmMvQyzPDC2nIQcdXdKMfjpfPzmh5G5ZUbTrcgwBanRTAVlBY6iq5GguFPAUbBkQGI/wJvu9xMC8TsdcGqheEZbaJMdRdV3JRobOCSaDdHzM/NG//82Upw7lTNoDmTzxTbYFksHspK1SAT5Z79MTkSdv7m/5pdr91FP8Qk0KVfMPthBG/8uHqjrYkLbuNweFOuzX97xXaEyAfXapB9fc4puLu55RpZsZeIgjgTEB/fcltyn63+0CtF8+DZN5Vy54rp3b7XwOv+YpKBNBge6QAedcW13sq3+PNMvkUPKNx49RLEK8KXEsA7+KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UD+nqGjl5Y7jj+YWbLy2EcIUg7eOdOBwh0D2z5TSUIA=; b=Q3cbliMLGfGuW7WQO+pfIJTpeU6vkAm4My1HFSmRSwWs0GangCVQ77wPCqzG+Q8d1JUSbrBgGdHhECKQWdrB6VacEiLSyebGKGp4vTURUGnyWoA2bDttAZTu9ftsiRkIIqWOypqraXCFY8P3rtDCbaIvFHqEp7CcI3+qe4s2FnM= Received: from SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) by SJ0PR10MB6325.namprd10.prod.outlook.com (2603:10b6:a03:44a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Fri, 8 Dec 2023 05:20:06 +0000 Received: from SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0]) by SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0%7]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 05:20:06 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa Subject: [PATCH 4/6] module: script to generate offset ranges for builtin modules Date: Fri, 8 Dec 2023 00:07:50 -0500 Message-ID: <20231208050752.2787575-5-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208050752.2787575-1-kris.van.hees@oracle.com> References: <20231208050752.2787575-1-kris.van.hees@oracle.com> X-ClientProxiedBy: SJ0PR05CA0155.namprd05.prod.outlook.com (2603:10b6:a03:339::10) To SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB2975:EE_|SJ0PR10MB6325:EE_ X-MS-Office365-Filtering-Correlation-Id: 75cd25fe-e894-4904-585f-08dbf7ad5703 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b7Qi+rUQB2mdXLYm6C9KPqI/eCE7EiSESThySYoAq86xGiIwkiNDs8SuCdaR/Q903U/XFWkhlOwV/BeSorcNMwbhgsI0KxO1n2gqtwZOiF5StafxCcCxMe9F5pDWkxRzILKlF0lrYkLyS7nwwy+1tj6sSuMYh5MESbH7qaGWCpQDiYFS+R8plsKYW/O3DHHKCTpcPG2W+bwc+/v1JkRLGR50397P7nXiLW4ZYFELa6Fgs8ZEVbkJzlXoOxVOHjX2ZCWz0SN1UXMDpNXzpo6OiJ0H10YHjaXmfOB0U0u0LVlZqInmO/50P+QSVZLxdQ0HqGPXFW9Mx5nzNOt09TXekX98zBbcyK9lc5uZVVD+/ETS1hretOyq4kFhLOyWOtzXRURagE5RBUcPOiOP0EEbDIcXRIt/8lTOQ8MuxhCkAJwfQHTJX02Olc14tRgjtSR6ivi3yuJW14W8Vj3rZMyhq0ap8R04ZszyIcZUb303Hr/T9gVY1DNFg1S7ZX68cC/xrvkfvRoCxYkxoI1LbMBWi9usuMWfTHM3mOn0cl2Obq2jV1C2DZPoswplVj6ZRjdN X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB2975.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(346002)(366004)(136003)(396003)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(4326008)(8676002)(8936002)(103116003)(2906002)(86362001)(5660300002)(36756003)(41300700001)(83380400001)(6512007)(6666004)(6506007)(1076003)(2616005)(26005)(38100700002)(54906003)(478600001)(66556008)(66476007)(66946007)(6486002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8AMHz3D6ENaWu+lAYOaytOa9PoHrEb+iujGIP9PZ2LWHuSie5BsT71c+VRHVGoCToxgOwDwDqgt4oXlQnv9crJbZkc61c5GO+qNz/zW0ZQGZ7wQTXXxg02VJstg7zh2G64GRQUOZvVZ8YEEHSFGQN9hSk321pxNz0UACrwEvvzGI3jBfWAdKVue7yPtBDOp7lMBta8zR/tQqOzD9YLzl89wgqKFgwaoGWOPYDgs7Id6MIsz6VgRy0MlBN5TMp3buTdCSSmvZycRRc8qDCjohBRgULp60rLt4fPGc7e5u2zGNZDhk/UMrwlL7IVfUBzhcgOA2RDQvRXA2Szjl2hJoj2oS1iqZ9nHWSgiG7e09N43NoXvX0Npg9Mr5qLfNwwazuA1B7LS2YufYeBSAgvHkdUHx1ClPuue7reACh2bogh0sbiA82XRlej/199eK/a00UsrmdLJySpeMasdgBcmg4VihxypPKiJOOzVxh9Bm6Rnx+FlkDnuYvX8r5U+VfSCZRs7M6tBoUUVmdYab680nyz6MdPvw6nX0EiUp4OT5GZc1R/1HGbUNG1kBXb4To42V69nEz+PBmktDc1OnXctgpKtqJvhy2GT34DJ/895y1t8ojKe7WOD1Yfd/po7P6zGBNlbxjHCh4DzIyQqC7ijD/5JL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u1e9Nn7FFJcFy0gjkuKrKuWkG/OUjq/WuruN35HMM1TH385L+7PXU92l69gTOQpFP6Mo3ZcbYPIxZaE4P+bHAlTpaxLnUONX/nWNBFtl+4rgbA/2ZVVW7neZvyLz/pbZEuZ1C5F4NhIxVzaf5mgBJT4YHhn8Q68Af5XQ5M6UYFsv6/etNJilyE0nGI3Y/6WrWZjW1LvAEJq7gTveG3xJ8zf1Cv9OOGVcjvK/GX80bkxFYxB/WbgMxUwEioOlarVubKKrb4aQKiOCptBuOny57XYstgaaPwITaEORDQ+kLtRV4p4o4A0vkKUrY8VQuAt9CVzHbm9WJaRR3M6GppfnYqdyjRp68b3M1tzYWMul45bDK67wzNYrOqeGYbjlJ80RdVji2G15/EL6n4klHwX9gnGz8+C+6aHNVD0/2VmJ82gTY32csxKBN3pWoiH24tzIc/zT3f9lkjeZ/pVqgp9hSmnjHRGx025mlkBK0uhKaYLNPpY/1xsvXW5Kq59UEBpD5cPq0y9yAO9jZ4U3YpUE/Ha2toYZe8nr+dP0cJs6eh1c7MvHHkExaiRGalUoBdawxwTaBNxyaJ5WrTrnGmqPymVuVrNJjPOcjoVF2DdpNujinrKYztRL47ta6NH2GNk6Dim4S1LYBcwj5mYv0bNrQB0u41rtHHXztVJSlfpkJKxoEiKthZSjpoqkYvfJbu5faYxpPr7GaDO8gZl3X4h9y1ZOgYij6sgjd+sDdqcdeU+cV6HyHaXNwwKJWA4l79mxaGHUN5UKVSDfRI7dNa0kuglZyM3QsW9SIAm6UYtzoXqQBWy2ySJnHVV2ys3fyb4qqXGYtH0sQUy0dXoM5 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75cd25fe-e894-4904-585f-08dbf7ad5703 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB2975.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 05:20:06.5309 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0aZqpxSDVkw5bD4OXd/vMLLAPTphANVhDdykJ03qZAaUVZQdnNRYCp0wuP1JDNyLbpoaLnWSXLuL6sWpqInsYxxMG8t5h9TLZA6tl9e6DKk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6325 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080040 X-Proofpoint-GUID: mKXtzGJE-qmxgDqCJhg-Jk67ns0O7_pA X-Proofpoint-ORIG-GUID: mKXtzGJE-qmxgDqCJhg-Jk67ns0O7_pA The offset range data for builtin modules is generated using: - modules.builtin.objs: associates object files with module names - vmlinux.o: provides load order of sections and offset of first member per section - vmlinux.o.map: provides offset of object file content per section The generated data will look like: .text 00000000-00000000 = _text .text 0000baf0-0000cb10 amd_uncore .text 0009bd10-0009c8e0 iosf_mbi ... .text 008e6660-008e9630 snd_soc_wcd_mbhc .text 008e9630-008ea610 snd_soc_wcd9335 snd_soc_wcd934x snd_soc_wcd938x .text 008ea610-008ea780 snd_soc_wcd9335 ... .data 00000000-00000000 = _sdata .data 0000f020-0000f680 amd_uncore For each ELF section, it lists the offset of the first symbol. This can be used to determine the base address of the section at runtime. Next, it lists (in strict ascending order) offset ranges in that section that cover the symbols of one or more builtin modules. Multiple ranges can apply to a single module, and ranges can be shared between modules. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- scripts/generate_builtin_ranges.awk | 149 ++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100755 scripts/generate_builtin_ranges.awk diff --git a/scripts/generate_builtin_ranges.awk b/scripts/generate_builtin_ranges.awk new file mode 100755 index 000000000000..d5d668c97bd7 --- /dev/null +++ b/scripts/generate_builtin_ranges.awk @@ -0,0 +1,149 @@ +#!/usr/bin/gawk -f + +FNR == 1 { + FC++; +} + +# (1) Build a mapping to associate object files with built-in module names. +# +# The first file argument is used as input (modules.builtin.objs). +# +FC == 1 { + sub(/:/, ""); + mod = $1; + sub(/([^/]*\/)+/, "", mod); + sub(/\.o$/, "", mod); + gsub(/-/, "_", mod); + + if (NF > 1) { + for (i = 2; i <= NF; i++) { + if ($i in mods) + mods[$i] = mods[$i] " " mod; + else + mods[$i] = mod; + } + } else + mods[$1] = mod; + + next; +} + +# (2) Determine the load address for each section. +# +# The second file argument is used as input (vmlinux.map). +# Since some AWK implementations cannot handle large integers, we strip of the +# first 4 hex digits from the address. This is safe because the kernel space +# is not large enough for addresses to extend into those digits. +# +FC == 2 && /^\./ && NF > 2 { + if (type) + delete sect_addend[type]; + + if ($1 ~ /percpu/) + next; + + raw_addr = $2; + addr_prefix = "^" substr($2, 1, 6); + sub(addr_prefix, "0x", $2); + base = strtonum($2); + type = $1; + anchor = 0; + sect_base[type] = base; + + next; +} + +!type { + next; +} + +# (3) We need to determine the base address of the section so that ranges can +# be expressed based on offsets from the base address. This accomodates the +# kernel sections getting loaded at different addresses than what is recorded +# in vmlinux.map. +# +# At runtime, we will need to determine the base address of each section we are +# interested in. We do that by recording the offset of the first symbol in the +# section. Once we know the address of this symbol in the running kernel, we +# can calculate the base address of the section. +# +# If possible, we use an explicit anchor symbol (sym = .) listed at the base +# address (offset 0). +# +# If there is no such symbol, we record the first symbol in the section along +# with its offset. +# +# We also determine the offset of the first member in the section in case the +# final linking inserts some content between the start of the section and the +# first member. I.e. in that case, vmlinux.map will list the first member at +# a non-zero offset whereas vmlinux.o.map will list it at offset 0. We record +# the addend so we can apply it when processing vmlinux.o.map (next). +# +FC == 2 && !anchor && raw_addr == $1 && $3 == "=" && $4 == "." { + anchor = sprintf("%s %08x-%08x = %s", type, 0, 0, $2); + sect_anchor[type] = anchor; + + next; +} + +FC == 2 && !anchor && $1 ~ /^0x/ && $2 !~ /^0x/ && NF <= 4 { + sub(addr_prefix, "0x", $1); + addr = strtonum($1) - base; + anchor = sprintf("%s %08x-%08x = %s", type, addr, addr, $2); + sect_anchor[type] = anchor; + + next; +} + +FC == 2 && base && /^ \./ && $1 == type && NF == 4 { + sub(addr_prefix, "0x", $2); + addr = strtonum($2); + sect_addend[type] = addr - base; + + if (anchor) { + base = 0; + type = 0; + } + + next; +} + +# (4) Collect offset ranges (relative to the section base address) for built-in +# modules. +# +FC == 3 && /^ \./ && NF == 4 && $3 != "0x0" { + type = $1; + if (!(type in sect_addend)) + next; + + sub(addr_prefix, "0x", $2); + addr = strtonum($2) + sect_addend[type]; + + if ($4 in mods) + mod = mods[$4]; + else + mod = ""; + + if (mod == mod_name) + next; + + if (mod_name) { + idx = mod_start + sect_base[type] + sect_addend[type]; + entries[idx] = sprintf("%s %08x-%08x %s", type, mod_start, addr, mod_name); + count[type]++; + } + + mod_name = mod; + mod_start = addr; +} + +END { + for (type in count) { + if (type in sect_anchor) + entries[sect_base[type]] = sect_anchor[type]; + } + + n = asorti(entries, indices); + for (i = 1; i <= n; i++) + print entries[indices[i]]; +} From patchwork Fri Dec 8 05:07:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13484823 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="lsCAziNX"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="YPpoMiHu" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF03310F7; Thu, 7 Dec 2023 21:21:12 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B85F0Lx007545; Fri, 8 Dec 2023 05:21:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=X0qjoUt/h7SR0/2/aOztxJtsjhdmjcOcAN3tFB1FMmE=; b=lsCAziNXdueBhCME4tZfJN+PGVGeDjTKV0xAtp87/vhGx3Z+ui4rj8z2K71VKCyexQCS 0bsM32vJdJdadRcbAfYnlfphFu99tkQ759MNprVm3fzwXUwERj8wArmTqG8XijQnBbYL qg2YR5Ho+k7JAqMsuiIrL/J1JcwbwYy2E4pVrfmspbOQRfvfoVvG9wCC7u9nDBHeCUK8 p81dQ5ola/rMy1+zpHSoXPMfJUzOyT6KE8ka6HOpvxip+8+zKntTjBlveLCaNMzXqUgi eaivot2xZAeduI5CtLv1F0ZtBreNpd4ErjFcVnEsgLZXI8zmb68y1WZWHussr4JBOnSi zg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3utdabw6qq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:21:06 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84Pc7S012655; Fri, 8 Dec 2023 05:21:05 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3utanbqb86-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:21:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mv5v05LDA8Y70t0e0y5+eINRLBMdeFjXXP4b1RkKYDLHmGqIzeJNXidr2TWQGVUB7l/+Ih7Fbgut/yLbvFax2cAkfo7kQ9CApXDvxPD6YE7KIx1G8I7JNurjz4bWFCG+uQ/tnBby243zbAIFUsZbTb8aXVvMD1VP2tcA6efAe/zUNopuFY4Ynx0XLfH9iDZ9AzX5Uel4Sgga/vWIzxMI39mxSsgK2c2MZMTJfQQjN1SX+GkMA9YvanGxG1NLDREWCxHMbTS/+NJA9YvMvoaFk3AH/CJuEsZCG5N8fpYl1u73Iao9WSqmV5xHOf8lLmbKOnmn1CgPjW3cGtk5bnzlYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X0qjoUt/h7SR0/2/aOztxJtsjhdmjcOcAN3tFB1FMmE=; b=fBYtim6lVEUQstvBq2mMj/ukW14BZB8s4va1tBiHkAkYUigCVK1f9348TuHUXMExALZWW6Fk8Tw7ipQVqzc8ZRw1sbmj8PQ+cYLjBtO4kPw7Fk7OaGSGx9Nbrrli5Dl3rpDO4RtiBxJPDrV0i9fNJUGJnep3js0PFzjiRBP68HHciCOrC2cTGb2IgDiG16ykLS+jFszNcfPzPgpUM4V7OeD1c5ejjZ0J6e+aPFa7Y3sDQRchE5gwoNyaCbWaTEz/KTUROvDtdKexKVuPzibUl7j1heX9gdLte9aCNzALZWxow9O8rN4X+UW9bPM0KaIj9AwhhQfhZjSjNsYZ4buAow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X0qjoUt/h7SR0/2/aOztxJtsjhdmjcOcAN3tFB1FMmE=; b=YPpoMiHuBFTbbsEqbgRULaISQlqmP49Nb0VuAwNE2/YkOE44IZFbr3U8FLFHgxbgwN43YWkaj1dFtCEAfdZmDDwm4025i77WX/Is7l5WihtnYq7JpTgkh7Sob8nRiJsZkgTrTblRyTBind5UFWzCePKsmRSDvhLa3jd0mBDRsIY= Received: from SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) by SJ0PR10MB6325.namprd10.prod.outlook.com (2603:10b6:a03:44a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Fri, 8 Dec 2023 05:20:58 +0000 Received: from SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0]) by SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0%7]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 05:20:58 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa Subject: [PATCH 5/6] kbuild: generate modules.builtin.ranges when linking the kernel Date: Fri, 8 Dec 2023 00:07:51 -0500 Message-ID: <20231208050752.2787575-6-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208050752.2787575-1-kris.van.hees@oracle.com> References: <20231208050752.2787575-1-kris.van.hees@oracle.com> X-ClientProxiedBy: SJ0PR05CA0036.namprd05.prod.outlook.com (2603:10b6:a03:33f::11) To SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB2975:EE_|SJ0PR10MB6325:EE_ X-MS-Office365-Filtering-Correlation-Id: 939becaf-1a26-48f6-785f-08dbf7ad760b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dbvoZQ3VqiBuKe8RB/4FH+CwQ4vx5fQmizXZ2PjqJbpDE1m8TgKGdkMPSdwuv31qHch53+7NsttWEoDFPMEHg/pqGu5tQfYvzjikgVOGU8CEJJNIPsQcOMBzijMX9rz1CYXBwW73gslxisb4AntVIYt4/08JK7GP0Nvq1FQ3wa2gq60hELM3jcQmla0sKqRt7AMl31k/1RLeZA6umhxGIzI0nbEDs3wqX83pIy0uKmTrrZzxy1SOxurAFP39Ern+pUupW1Q1JKtB6DUU32fKU8bNUPqauHChOJhvZkqkD58XO6EyHDC+8dclNh3poJnZKPtcKUWKZGbWcpHj4bX6xUkJUlO20dbQ+WxICs2SG96uE8lOLaqbuBq8h9ruNWy5nJM4lzhTra8EqLbv+GzjuRHzxg73DuBBC3HPkgKztuYbVHKuicnDUeK//26SkZM4i4/rs0TnHe+xvUd1sUoDTa/nn/hNWFqfyPoVtnY7bcjO60Wx4xDJwjNk0sTslvGrOJg8Y9vO5HbqRD+BRezcEbgqqIPoLQKDGh23a4RVkprtnIIkCf2L4F8UocVe0oyM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB2975.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(346002)(366004)(136003)(396003)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(4326008)(8676002)(8936002)(103116003)(2906002)(86362001)(5660300002)(36756003)(41300700001)(6512007)(6666004)(6506007)(1076003)(2616005)(26005)(38100700002)(54906003)(478600001)(66556008)(66476007)(66946007)(6486002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ulbWeG+fwHXH0wnv9zUXLV//iasNdlI7qUo+AO5dxdFOuibne67Rzr1r6Rb140nhIRdU81O2MZZO1iZ6pY7IHkGnbCsleUrHMnzAcCoyfo6Q3+z2eGeXMZdIsDJXhu0BCKxiLKIsqiIzyJHu3SD6qB84WujFr5NLfgsCUoxGTcue/dZaxq0uW1MXhvVQkFBoJncsfbPyaPmTDiYw0HI73iLQ9XlUgituoqrVbc5+bHXZU35ZTZ6NfFMAhQ6VATyX3iezRa+ActWepe3WWnrJSgZr7NVq3i1Ps/aASemC7ENxEa0Z1gWFP4tpND/G7CW6jPiEjL/0CdUByHPNsfIef4/RDlrJMUbYViB0S364sJImPZ0gmlwUIT9Pz2UIkUkKVhPSiPgJkSC7aH4znqipVvWGvmzLu3+GqRsvFojGcXxwkOCDvG+8ZtIxNByPprvvpTXIdaeS4kBOMBFGzjrbD13ddDi8h52qzVllHXThulWwGN1RLVJKvStC+K91H8te3MrB4UwVXgs4VB7w36wuMbYNKhOfo4Bn5eyjtNXGsVxZBmd5DYLh/l7fJbhZhBkgdemBAXELnHSGVS9xNa6myjc5ysGfQaIBoxUHHqucFh7VgNW1xLnSsM88SRHaO6e2L5Plt2kfz0nGyL7WBRemlH6ajnyVXQX+COxC+nOlRJaviaYnFgra3x4geTzhy6LFiuyDsATpZaFnkzBQ515hY9HcWXXHWlMLqb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TRSAhCFdBeaBgRE199iCAP2bGNl4MD0/kI/HzOAegKYDcMjgN90yMY8crG6G9V334oxG4+xeC1bGYfLiqAtr2NwuIlakQ+wob8tPGzDdGoHwIzEbWHNGm8OY5u4BaTFOgX/Spc0Nd48uvlJDW0ZiBQv8P742+GtIyJ3UFDVqL5x+Au5IyXW3BNnYJ3CDypUtXbZVVF/GEEPzdo4XCl81LvEl0U9PHOroYgE2nyo1aqh3xpyUsEyHxuBptQcWC5KEfpHpMGjhoQLhQ0gOYLmjZknpNirOAQ0UPP89LY3bQiSAU40lOBJNCsx/mjrkcwU4mYDE0V5feXA65Ke13C8Ro6KDbpdsABoAdaM/9zvlbf5IWgPTb6PPsMKWC8yDZJhXttXQJ4hpreUFG5aAsxWcM2fZKh9YDkmbzz8vbT6EvQ1oeA63sC2R3O3YPhD0M/mL7u6yYRz5/PH6/yGp7wQs8L04jWc7Q0P39dVnriJdeddkEsZr2uhPaoMkNDyKaGJZKo3U4HtVkq2YDxBfXyypYNP+RCW1fX/Bjc+o3+afqjxEj4F7p6A1JG5/uRUCehmIu3MTUpFkEzjuYXY+49DvbkmHWcPYD9GHdUfcN4Wn1xNg58SWsoitUmJlksYQQBHENXgdanMF2stSwr2rpyRgKhb8FKuKr6W5hWUsz1Y0ZLoGzTgNcclWhYTrsZnbIELDn8NGUFfLPUTqruDU8MQXPvjX+C7pB2WDjRlbjSnAFF6zun+gL7KXRMto5XnwA/plE+5Vrtyek4Kpe X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 939becaf-1a26-48f6-785f-08dbf7ad760b X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB2975.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 05:20:58.5611 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aOTfOMNTHiBvsFqPgJ2c2dysS67i6pf5aKl/Az8lqIdTSOImrdZNHnk/QIaAt+x6HVcceNUmNeQ+gn0oS9ywhERgmRzGe4yJeWdm/RDlzxI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6325 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080040 X-Proofpoint-ORIG-GUID: W0nWDiDLCPAYUF9AAujW9lx26poEYlYv X-Proofpoint-GUID: W0nWDiDLCPAYUF9AAujW9lx26poEYlYv Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- scripts/Makefile.vmlinux | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index c9f3e03124d7..c23d40b023ff 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -36,6 +36,23 @@ targets += vmlinux vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE +$(call if_changed_dep,link_vmlinux) +# module.builtin.ranges +# --------------------------------------------------------------------------- +ifdef CONFIG_BUILTIN_RANGES +__default: modules.builtin.ranges + +quiet_cmd_modules_builtin_ranges = GEN $@ + cmd_modules_builtin_ranges = \ + $(srctree)/scripts/generate_builtin_ranges.awk \ + $(filter-out FORCE,$+) > $@ + +vmlinux.map: vmlinux + +targets += modules.builtin.ranges +modules.builtin.ranges: modules.builtin.objs vmlinux.map vmlinux.o.map FORCE + $(call if_changed,modules_builtin_ranges) +endif + # Add FORCE to the prequisites of a target to force it to be always rebuilt. # --------------------------------------------------------------------------- From patchwork Fri Dec 8 05:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13484824 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="YcjPqF6H"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="tm1oBfaK" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96EF710F1; Thu, 7 Dec 2023 21:21:44 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B82Sm53019457; Fri, 8 Dec 2023 05:21:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=NoFuyu/t9Pec//WyeQ5g/V4mc5VpN86s9d9kKvgGrf8=; b=YcjPqF6HVshSbOyOV1PQgHXItFzdfnuZ5BHI7gkDW/q6fur731Xw14KxRGUStguvSTlO NXWrZo6WXXwBUpZXHS3UwmAUSIaZlNcOi+QwM0lcfO5KWJY10FVHfGjRlP7wNOf19jTD IJPGKIjhhMKsGaw+S+x21jLjH/h+IUISZYkMGLEYr2R5CTSjqkn+haEwtPm73NYcoaVi NKZsoNRiIoGlsxyNq4fsWklaEPlN2xXoj34PED353DGnJFje0II7bP8hiaIjHrNq8dZJ 1e2nKnNJnBNR/KuuCgPWSTU4sjKVa90P9n36Awvj7yPYYiWK3vkmAnx2BueEtjtP7xp9 pQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3utdmbnddv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:21:39 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84b0xZ037433; Fri, 8 Dec 2023 05:21:38 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3utan8epup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Dec 2023 05:21:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BOC+dvVJ8T5chBkWiE2wCVMSQR7laQU8j9Gb/fzbB5JA11PSJ3Fz3J9vJBHgE4iNzWUxe4g3fHOuhGYMZjvTSwWJuDYb0Z4ZrvPDZSistZWaQB1gi+K1CaSv3QgjQZ2DIWTc0BuVGnLOmlLFrf+Eiq8+NFyxDX+HF3HPkMcxMsL8I1Guh1JDBEYzQN8smBBM6fxgIzOEA2F9tIirnl2/bcgIJ6Iz67N08uTffm89nx3c7jv7sJgVhTwU0tHyvPWLW56VIjNQzgyqJGAFbJxocoppXnZ7FOtE0EUHW6SMUCD/gc7sBhjAtLUIJ8UV+5n99eBxbYWn9TAdhzj76rXHGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NoFuyu/t9Pec//WyeQ5g/V4mc5VpN86s9d9kKvgGrf8=; b=dkNa2NACJYq+OmdXqmlZ89Lit1h7Ylf1/BvmPIlewKESwfqEz1LoLg10UvzGbXoLi0t2j0hdgdu34+zNLAlv11L/2BGCGw9mT6sC22iN24WGd5nuviNzcsWn2jTBEt5qighoDU0KxMtFnyUzuJxkksoI2HlA+wpol5deZtK1gvCSaNPEAWNcpe/to7dKHkiHY51LNKTs57H8//SK3uKoM85Gwy0U1+s1HL+ANZStTxQGb0oqvrgFMy6KhUTcKnlgR5kIHrwVVIHjqu9QzY624/01Q55F4n0Hxygc9yHdZXIKl9ALu4Vl+I3+Jf0jWR1/iW63BU+ktxw8nPJxhggjKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NoFuyu/t9Pec//WyeQ5g/V4mc5VpN86s9d9kKvgGrf8=; b=tm1oBfaKo8qUWv5UVssdVH0iTZow1naLp8PdFr8xVNcO5ezaZjcxDaCIEqbuBVGXIzDJP8Ddfi86ahXaxhniw4j3i6YZOO7wLA3TsQ+FLOGREgf/TlbwpjSqwfJIF61lGDmPFpSUr2BZ2FwpBY9x2EPAw1AW0406X49d2Bz44yY= Received: from SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) by SJ0PR10MB6325.namprd10.prod.outlook.com (2603:10b6:a03:44a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Fri, 8 Dec 2023 05:21:35 +0000 Received: from SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0]) by SN6PR10MB2975.namprd10.prod.outlook.com ([fe80::de47:3c1f:a55b:58d0%7]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 05:21:35 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa Subject: [PATCH 6/6] module: add install target for modules.builtin.ranges Date: Fri, 8 Dec 2023 00:07:52 -0500 Message-ID: <20231208050752.2787575-7-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208050752.2787575-1-kris.van.hees@oracle.com> References: <20231208050752.2787575-1-kris.van.hees@oracle.com> X-ClientProxiedBy: SJ0PR13CA0165.namprd13.prod.outlook.com (2603:10b6:a03:2c7::20) To SN6PR10MB2975.namprd10.prod.outlook.com (2603:10b6:805:d2::10) Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB2975:EE_|SJ0PR10MB6325:EE_ X-MS-Office365-Filtering-Correlation-Id: e545ea73-48c6-4c1c-7695-08dbf7ad8c14 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xdiz/i4YM8uO5AMcp30Xlcn6q5BY8xGdwtXIRJg7toUiPVvaRahavzEr+gfljPUTEKHZ+RfJfcMyNprEHiPIqDp4+UNx5s0yjk02X6iWJOVQbC7XQtYPt+vKN5ZEhn1cpOYkMv1IIcPVHDsSmPzTeWyghaOwQ5Jtrig9u9zaE3HLjZ7Q9lUADIug4SkosTqHLj1jbP9eH6drlqaqNM1v6xl+Ov1cNFvPM1tRMic34iz6unf10JoakP0cZZzMCrqeI/2tQECyJzpZ874tfDpzI+ic7ha7s242Jz9ZBUiG1ZEpNvzVxQwv9Ho1um6DslLq6aDY6IpztKC2tfg0QuI3RlCJhDjQm67q3pwCeTV8HItkNoJwE5mMIwGa7gGyf9cSjVMUqs4zB/78+GV5NHB95BvBP8gZlGe1jnB2y0ij8H1Yc7fEgg7/ibH3uYFED4/ai5APHDRluUHd0vlyEeAKJsSAKyff9q5Mt7yqlZvaLlK764jYhnDgCnsYGhQSoNob0E+KgxSUIXguhIxeq2dw4TMY30FvT/lmTQB2aBezgEERHMAd/PghuGQtAx1RnX6o X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB2975.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(346002)(366004)(136003)(396003)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(4744005)(4326008)(8676002)(8936002)(103116003)(2906002)(86362001)(5660300002)(36756003)(41300700001)(83380400001)(6512007)(6666004)(6506007)(1076003)(2616005)(26005)(38100700002)(54906003)(478600001)(66556008)(66476007)(66946007)(6486002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: au/9Kunh1itviq4mdtbhpXDd/n8W4P2LhDU80hWKZ8tMSBNTFlAf3NIZE1i1c5ioLtaK59ER07bD2h30PVQNl/9gPiHy4ioWO+7hTFN6j9xqji/J7XDmuvCUXXIYvN5KldJ37T97CqyI2FTkp4BLn1qA4R+lBqF8MM0bLBnB/IPs0gYl48y7p96u5eC/3hKtk4R49iWQUOhRzhU43pF8RmTRfIMdci5+zhCB86n5mRU4tQk+xq0eyliKxQx0ae8Z282Vj1L7ixXokU3mX1p5ptG3s2EIHXrRcKZOB+SFxI6F5ruQgiFOe4f3GlP0xH3NN4GH2tiyTSgNSfRnAOxVa7eAF6c0KE2YV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un9k1UTrhBnwwEkUmfQP2+WbY9liIHxWV4UDYLOliUicuKwT4k1zsU9JcqTF6GormLFdUT09xISg/DiNQW002YnLKZgxKu8GZYgdjbkECA9ABi8klUEzT/jQfHWDWuvBKOUOCYsk0EcfERAGmvDLHFUqDjpv9iL81jAKtWRTcAdT1KrlgF5A/PiculuGD+bSXMLk4S5ig== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GiL3q+Xmtwd8YSocyeftn4cyw0ZcSOZW0zH+iR5fVYTk75y35cv9Vc1RReKdqkb3hb8mQh1tHGI7P/xWn4Eva0pCMiXORacokRc15K5GZWFDz/sR3JdWLm/N7eXxS12dJvHLgVNIB2+nRxuZ/XH2CPIxHGJAZ09brvqIfdIWrCWZHLiqVEbqQB6ArGCm1JSG5w+PNNc8phhC51kYndoGZDLZBLnenaiVIUyUCLJkzo+ga+v3w87eJ3l8ZfEIt0diK3tirO5st/KkjAWXzYbhssoR/aP8frvg2CErvruXNhJYD1drhfErXIJDfafaPnu9zkXzdMDFIpWFofiLmBpVzFHjGgnOczJcRZTOXxt8/cztpO2j1oERCaXDajyc0ZPMQA7RncSkmRn59GU9ceXt6s2PhPrlC47V9BNiBwD1tua+8GErGDr+fvhxLEFrP8XtwmRnyYvkEoeUmbMhFXu55Ry/BQMXqipJh96O8B+BwdoZFq4LDbhtSWO3qqt30loIc8x0VNxpbLIVudNTUE3dFwcw0T50tpT42AKEyBF1q5sEjITRliUdEIlnZ8UUt+ypjvJNog/RNEb4ZmHXES3CfrsjSwCluS/KxwgaMLkSf6XihtpUnEgleCZSYeRE2A9wXh4+AROts9W3fRrS8VE3dVtfTb4V74uI+7Pu8meRByEoYcCshySCjybBVzTy+Y2Q2htuqDCQ04F92qlDA6FSLck0vzELDIe8SH6Fen0FqUM39T5QdwCKMfmyjdFApRmrhQfHTdTAmKZBEj4k+Nr8HXwbRd/eumtmWOGg+LUK12fGPnhYrSeLGET35vPG0F6X+cOO6U10gb5SrFW4kPMdm86mJptcxNi7fQnQWelcKwxRLij60aU5sxlTRz8CJiFT X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e545ea73-48c6-4c1c-7695-08dbf7ad8c14 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB2975.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 05:21:35.5641 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yo9THaOVaDXaSv1sFLb3KaLsWJ0yKUxMekVYZxe/Eh+Iv8JTBoBuW3qenCHkpE1RivB9FQ0mkuoF/QFdSlhQDh/p1KrH/qQyWE6XeH3ddz4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6325 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080040 X-Proofpoint-ORIG-GUID: CHbh5dGH6rJs2PdgbKRxX0PZQpt2WAId X-Proofpoint-GUID: CHbh5dGH6rJs2PdgbKRxX0PZQpt2WAId When CONFIG_BUILTIN_RANGES is enable, the modules.builtin.ranges file should be installed in the module install location. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- scripts/Makefile.modinst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index b45586aa1de4..f30f5ea04566 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -36,6 +36,11 @@ install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo mod $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.objs): $(MODLIB)/%: % FORCE $(call cmd,install) +install-$(CONFIG_BUILTIN_RANGES) += $(MODLIB)/modules.builtin.ranges + +$(MODLIB)/modules.builtin.ranges: modules.builtin.ranges FORCE + $(call cmd,install) + endif modules := $(call read-file, $(MODORDER))