From patchwork Sat May 11 22:40:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13662545 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B587D1E515; Sat, 11 May 2024 22:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467352; cv=fail; b=LEbMkhsSeCjn+KcxqhKQqL5hgZp9gEYog0oiBCjklftICXEL2QctB1NNgkO2lwUCt7aerlj6Q0RINgFcZVyFwcRKpWab80fVXBB6Unr7rMabA3JBAks4iIRBRGFpTeDWRmq4RBVbQBUMzyUmMxfczZSKax+HVH8Nny/lowOIF5c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467352; c=relaxed/simple; bh=geKB9qy+JRrxBtsNUe7nQ22rj1rk/VahcS99mIexWss=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=XVkoTbF5hrml95819kaKNo9iZS16oeMlAvJWeISID4VrWqjg7qN7TNlmvIwGapzpJbVAM1Sv4x1glR5GtwcEVTmQlMsfp/gScRma6kQPFwpj5AGX3zsGwA8mwL9wmLuSvUPlLkEYJxTty4jep7ypvMWT0SaGURUlQbl94psQH3g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=jfQDC8Nd; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=scbssE+y; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="jfQDC8Nd"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="scbssE+y" 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 44BMVPxw027975; Sat, 11 May 2024 22:41:58 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=iRCipYDWApGhlToaWpH6pYkFSt8QdbJOBA//Rw27tEA=; b=jfQDC8NdNrBct1i5jpINf4FpA2sCoSfpfI6MYol3Jbzpy1f7Ouan8Byng2icczNrRdAA XL9V26wkBWIOjZS7DA0JS6eaJBKF843I0n3nSPStt7k3NdUPVW5AXbmiH5xBaxjnZOXr 7hYtYHZBb+Gzxvux6yv51DIzrF0n39jI69qRwFdv9cNmAeeQ1aGo335TIwx0CW70qK6P /D7aIStC5sQAeoUPaF6q9oD9wqkxmWjBTYLlHvI36uzO2hjX9a2COZl1b9ZmntTkGFz3 7FVhqlcgQc6Lo8TNPvBw/ncYxsnIL0o2qtFUrxXzXMOmjJCLy6uqAed8b/UjpLpVk59L Fw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y2hhu804s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:41:58 +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 44BGY5Rh029560; Sat, 11 May 2024 22:41:57 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y44hfry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:41:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=avZfJFZ9ZrP+DGH+eCNxAfHl5HbkiKjafkweuyRgjLutQlI01/Y+JcUaLwck6amX1D3Hu6S+RjdsZ5hXxoHU0krNjIyC+5W+j7htKup17I+/HDxp67uNC3zKyTeyGRMlDJHplbyV6G9v8aVnN+5f6zDvVOxsoD25yML/aqX7VNCA2GzzCyCrEPwPJJxGYM1b4lokRWcQxV4R01+gkBp/dZPGnGJhL/18Ah0b7RcEaFeT/+KmPMgYdPTiYG70FUDIcPiPa9tNYTCO0I3oJWQZvuIo6Ns9b3yHQrAbBdM0zrA0GNppDKL5p5ByQJRYbpAxgaKp0BK4jI4HAfPaPDI9Yw== 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=iRCipYDWApGhlToaWpH6pYkFSt8QdbJOBA//Rw27tEA=; b=TOWsUfkqwJmjBCziugTEZ1PSauuETmZDTep7WscXusWp3SYDmOgoB+PiHujP5rCxpHL7JcrDgswc8g016gH7ODY4iaAxxMkzOKkuruIbr7uiwjMqYp1lqmPsM9Y/WGg8+xUwbiW1t4Xg1Y2U97wdq68Y8vWYZWvpjW4iGOKQTTILQmJJIewEhviB1XG1hPY6qEfOGo1zl9ZBNthHj3TtLVDBzosZIdttVxeFHrO4iIzcACivcE2BU/6eQj/Yig99T4W/MNBJz2hI+D2NOn7xISPFO6X5AEAylvSH1bQluO8rx98/2EdjTNLoKP1TMcFDGQ0Tp478T1vj9PhVldtf6g== 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=iRCipYDWApGhlToaWpH6pYkFSt8QdbJOBA//Rw27tEA=; b=scbssE+yMMav5A2bUgmMhxoA/1rdCFD7PsTjFFso5InprmYSfdWXj+O0jtz9IMV0FSi4t/tS+HLfqNiE7t+obFcqI6GKD8POg0AlVhtpqHTDVoqJiiqpUBjc+JcFbnng0+F54AcGjV1wm6PO4oS2K6K2Q8FyBKHmV5SeCiWeCp8= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by DS7PR10MB5184.namprd10.prod.outlook.com (2603:10b6:5:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sat, 11 May 2024 22:41:54 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 22:41:54 +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 , Elena Zannoni Subject: [PATCH v2 1/6] kbuild: add modules.builtin.objs Date: Sat, 11 May 2024 18:40:30 -0400 Message-ID: <20240511224035.27775-2-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240511224035.27775-1-kris.van.hees@oracle.com> References: <20240511224035.27775-1-kris.van.hees@oracle.com> X-ClientProxiedBy: LO4P123CA0426.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18b::17) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) 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: SN7PR10MB6287:EE_|DS7PR10MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b1b0a56-44be-45da-8cb9-08dc720b8ec8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: 2xE9XdUNWMTuvgw2t7JVAWtvdWlFfWBbtZPLPTGPvKREkgSEZcurCM4BXMqho2/h29/CtrTvbuNsWYoZgK2vScT/Y/uLLQVD1wquNQXO5DESNHF+2DAkEUTqL2k6uNtzPzPTzrrmJxXECbCHHmkrZ/z8VbtZi2L0mAddVgUQ4hEGLRv2OTQ5miFogUNYIwTTh2vCrTuCK3FT74vCeFYLnG4gxAdSKGP6nee/SWeQasyecK6qqE+T/EpUMU5fkLp0lJKcW0lfjggpvHXXDH4v0/3H6qq009ljbWO3zOe3Gp/R05dRknV4Dqg6XzMPNVUGnyr9P4grsEPjRHVOUBwtcPX9SG50o0cUNxU+Hfi6Rqm9lvg1RNE5uDDmL7TlMGnPKFkTrF1sGXgPMas4faFL9NiRBWZbqh2wYN+XB6FZjPbXJQRpLsNxN82SPX/ONnpemiSjw0kX+LvdDCdVadbTWqjIIeTm/xkLoQn64nNPWhXlrFqg5sxYgwkbPSf81goflqrEfmzWK0Rj6IKB1DbdC9ChYL4dSOj9JQI2VBzARBlbfVSyLhWBeWhIbPOhttC3foKPYVkK6dRdXucg0zp+hHo3CF2o4E2erSHMXyEg/aZLUS6KSwBMYp1HyDqY/gJJj9xChRBAsv/1jNmTcKSRLV9u4nxUik0u90ZnVV4XM0MSpHvVd1ZjKYSKpgG9tQfp4Fpedgcodkwt1m0Z7tas+V4chnmk59W7AE6F4t4kRYEcF6kHBc6rA30q8SJSYFdRitue/XmeBzB1+VEBJP6DHkqsKkJUwArCmTKKt8biWubOEVNRfwy2xsTbMrlk/1AtK8pIaOMEks7Lf5iOZhjGjtB42s4c8D7UtRlSI45z1VqVzumCHF6n8GELciJw/wfau76fvrxATX4J+UO9MkB0k5Es0WU8cH8ahYZL7l5yDhPwGP8kjthlOPrNfYj069AQWNxorhcIIn/APwzlAZX6WxCLaW0ywyLrmPRChrwEc7XJENQx8Weu2tmmCuLVDy5CufcbKA4BlV6I6bqiiwFeSeYNr7Fmax9OY9VxnXG5xpjpVuzXompVtiQhvnABDjd3TY1wrvx+3wemdpEJ0vPvUuUAr9Or/hEGRrOsvc9HSiXTzlcP01AoiMNmj5YHVRuXEQCub0YQw5BXkLLD+DCojUKoK2GLKjKpzvrncY3x+UAty4YL0kZuNn34EWSB7dRRRErR9SUn3qNlA8GMFLU6323P76Y93GLeifGGdHs+0MKDFjZibE/YNgoDWwVvGzAAXJ6wVwx2/ro47R7OElm5/g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-Ant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LIp+H3pvur22Lkky44V5oDxvfyYz19qisVVZSrfwQXWQnVRfaWyij659Y/lXaI29sXz5VbjBm2+ut/qMiWSmA4vuQUEZcjZSUUkZ8FbMzMfRfFlEKuofoFF6nw5DM224embf0M02Nd3kRwlt3wX6hI0JOw+MC08NDGOgVRQC15tOd8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b1b0a56-44be-45da-8cb9-08dc720b8ec8 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 22:41:54.6202 (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: I/uw7ypOPH8h+qltZUXMcPDO1ilUCWyKkBFQk8JFE9hQzViDZEfgeWeZOBY6fwwlypg3HewP+3pWL5zgacUTHAvYvr4AD6iffCkgRfHdOmY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-11_06,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405110171 X-Proofpoint-GUID: B66-KBWYOWZ9JbvHPX_T1gTY3oVEY9Sk X-Proofpoint-ORIG-GUID: B66-KBWYOWZ9JbvHPX_T1gTY3oVEY9Sk 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 --- Changes since v1: - None --- .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 c59dc60ba62ef..62ede8565a2aa 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,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 3c399f132e2db..75b9655e57914 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 9c8d1d046ea56..79e104ffee715 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 d51d411d44a82..cc979f9874f5a 100644 --- a/Makefile +++ b/Makefile @@ -1140,7 +1140,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 @@ -1476,7 +1480,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 1153b0d99a808..cbfff06e00cd6 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 3179747cbd2cc..3b3baa78d4fbd 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -118,6 +118,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 @@ -131,7 +133,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 0afd75472679f..b45586aa1de49 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 6de297916ce68..508b3294e2cf1 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 Sat May 11 22:40:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13662546 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7EDE1E515; Sat, 11 May 2024 22:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467361; cv=fail; b=D5ouWmTg3JBE1Sh64VX8N+S6MrNsM3wkEAjo8E8/ZsfISvygrYOw6j0KzAECbYNfHM6FpHexipXxR6x2D+QP3aO19/Opmopf7KxWh1bFw3syFwqmaMICmKK5hNtKwSQgHCh9Glk2w1Vhfuuo4eKb8s9zQNVDHS2FR1dnet5xSew= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467361; c=relaxed/simple; bh=eqBwIYqJUXENU8wTRHwbVRahwLv/XKgYUQGYdb4HQo0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=bhrXehqQV6f+eeRLJdyQtRLAVgHa29GjUtZWNqlag5DxPYfGZNbQC+fSnmUFGn/Vbf28EF1M9itjH6L1ns62gtEB/HksrUh3CtdZB1KDUcrAeTMrrXAvqDODEXrM3DQHrUXAwv7V2pN41H477gmHpcEpFJbIfECtg6M2xLL2nuU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Wdjn+eOL; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=XhzDRXaE; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Wdjn+eOL"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="XhzDRXaE" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44BMJAk6029217; Sat, 11 May 2024 22:42:33 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=uFZaErPgcp+DbdJU7ug4c8Job03DkjNOMFwF8gz4aLA=; b=Wdjn+eOL3m9Xl1fpkYanc9xtb0l8rUiHB0vPkEUx4ZsiO0KQlySMxp+ltz4JpGhDAB3B siMz1+jMftYRGUCQ5QQV6N8LA4F8JWAZkDu2EScAQKAJQOOt42ZMlc20wYpGPaMNM7NX mtVwO6Ib2/oMlTkLQMmZ0FCGGexD6hxjS6v4YAQOjhCHek9iSsZkmrUjAKLA5FIjqe+v af0wi+/RwTRqQByCY8GT8l4dkNd05E0fsf2ZFCcxZiVg1hgZ5IIEctvnmZg9R1a8BWgg iQqEoksqB7ZaqGyPijXQvbabj5tpgckRwMg6ZwiFXQVaxXjj/MAsCMBvbala3dj7cLxD pQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y20qd0p5x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:42:33 +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 44BH3uDo029550; Sat, 11 May 2024 22:42:32 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y44hfy5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:42:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JqG7iUVMvS03svn8tBiEXyeb6HZnwaLUpfC41vxVQwLzcm7fMq6G2WbhVopYtWC5GNk11E3Jb+suJJ0xLfl9NQG4FcYN0M5ObSqG+MhE1VeYl0doFsdHEX9/Fdcp4P8aUWAV4jkCbSRxTx5HDWPBp7gzpoLinwcy7TAGFJJU3QIxmO9802K2aCeWy9yUEW2V+ketO1O4m7BZSvCQgjynWUPtGsJJl/cL5pAARu0zSx/Fo41M4YJx/rz2/DRetyzF8rpfOU7uSlqYk7d+rBn2r08QGtWZGMxERNu9x1Lw33cgC+GyNyBYdmCatTaCzH4NSUpr/wh+T6zCFO1DSjTsLg== 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=uFZaErPgcp+DbdJU7ug4c8Job03DkjNOMFwF8gz4aLA=; b=nQY3sDP6olfSGcUw8uGpVVG22bcD4tM8B/3axsVI8OcSsn5ZSSXxDKg6kCAfCAjwZrROeJmCj2L+s/RArcuBkuV4fwh7v4gPaxTFlYcM2HDeikeS2vTIu3ceGGHyNkX4J723ceev79RvD5l0Vi3bCQCV/rM+E5/ObjljsRc/qVdp4wcspJn5VFDsnpsxONqAkdUK2z+Fv19KSaGo1gjCvR2k7jdpwkUu8tZaUXymtpuZUZQ/E3jrE/MYfpd7lWDqX45cvL3ulmv0kd54wPWNXbhNZ0uuh4oT9YmqaqWqN1Qjxs0vlgMDNDLM/wSC5qHvULsdAe+z5a4yLta5ULNJmg== 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=uFZaErPgcp+DbdJU7ug4c8Job03DkjNOMFwF8gz4aLA=; b=XhzDRXaEs16rzRqq8SmBLnN1FcY27ij6Egdor3kix4Ykw9fkK8S5v+/HdJ+rdjokYNuEr4xUP3k3EBzTXSyPS/zI5TkqPXyvbx4T30bgDUw3j6I6EMOx0qHRCB2iMUz8zViIud6PUKhGcmM0BVtC0gT0DDjaepwaRSKW9lHZNfU= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by DS7PR10MB5184.namprd10.prod.outlook.com (2603:10b6:5:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sat, 11 May 2024 22:42:30 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 22:42:29 +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 , Elena Zannoni Subject: [PATCH v2 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option Date: Sat, 11 May 2024 18:40:31 -0400 Message-ID: <20240511224035.27775-3-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240511224035.27775-1-kris.van.hees@oracle.com> References: <20240511224035.27775-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BLAPR03CA0119.namprd03.prod.outlook.com (2603:10b6:208:32a::34) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) 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: SN7PR10MB6287:EE_|DS7PR10MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: a6d394da-f3fa-4554-57fc-08dc720ba38c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antisp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qnEeOln/0rqkrAOzTWvVNngoqBG7GY4l3p9WILZF7PQ8plvN2zNvoRQnkvS0WymDhN2UAyC4JbxK8gQgOxrNWndg8wVFYrYyfTLakC3pK/VxxtH8KZMrNIR+9GboUIFPuhCz7fttSmNDYYacNWB8TLXnQ+PUAHgJg6sfBdBBD0A1mqcBEuLVG9fzaOp/0StlMhyFrNK7cYm2+gKsn0/NJ4bx7MFgc9GR1xDUtHg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bhuMvpzeyi/e+pFCr4IdMGsYXpvhVdjpXX2Tu+c9jnUfuGjWhdoUeVqxxeEq013KyqRQxThlK5NPs7caw3iUG9IprXZ0CVtifXZoVEKh8xbxJZ3llicX3aiZ//9WYvAV6YRAxoaWmFFLXy/yCWYpLiljFVQnCCPnplc4N0qHcs8OJjyNBXX33nRxO9IETjYTN7pVj5N95Ki0F50gTnVEzISU0JZR7yVYVLBVR4+H40Dqz5b7opaJ70Kpj5YT4HB/Klc41qSB2W8jPxLAl34w27v2bz5OrqLhBCb3hlXK3vEGJ13Qek1MbFpiZMUCH2ckGAxnONzFOtVnvbERF+78fgFBp16LlXNagiIiW1XyQKNeFFnHQgweQH90adYzAsD74VJIQ3jnOutND3AAn+sCnG/MaAR9MyVMbpXoK5iiX+r6kRt0b4tKrVByPmzBMsD1DIYnUAWxIwNAWUiB/2LK0CZZLgFwzNW7+nTN7tTeI11WW30ABHckT8TPkWptxSA+tezZCfVsSqF7xy7LOp0ATiqLzgHDTwZ8/OyXqlnIvdxsP+Kp4bMs2qwDk129TGHnX44VOGWXc8poPPm5xNjOAA5qT+zAuq/IzLf31RFT8r1H2fX+fpGRN3D2XonfieqvpCB7MqadnmHchTQuHMfE0BU3XsX/Ho/hAqub9mBeqhd+/rXmaFLn154hXPPrr/3/MQhfhEkFl4YxETY3KXzjYkBFPiDYVDi4WIAiT4Eov4OtHZ0xCyre9g6UzVkHww4g5gwangya5kIvH8wzC5I4YJmRMwJjjUEHpvB1exUs9FBofpq1ruAW6jF2rginuEyURTklURdszfb5M3ZGcGTArujp4VmS0nxvKadMy28pDA2XeVVSE9Ll1c6xsw7aVYCSYUX9GJoj9sOwGaRpvOmLoLVqI5/oLSZ3gVFctYdgEXW8OzxI2K9wU6q87g1dG7/k9cOB2EiXbtquxsWxctZELTnIt4Qm2BcKvbyhyBAH8Jv9ixjQ099CnlAR/TzJgHwCTrpyUoQidyBm5zzjVfC1i6n9LxLnrD3dspnxsS3WkywcnD4KQlM+KgeOgRWUc9hbzbXMOKEbeNIWaJEIrXmX7tx8MR+/akW8LNio+CEFabG01KKuFr2a96HNTxT7AeioaHGFs57SYF35DNEKBcJ2jOUMDdDGIeqKTvEJYN+FdyDKEbnTvV85wsJaYD9h9NCjumHFKMfxMR9V6OlJwIlGseOdlaGtTefOHneXlM2Q0Cb2XGeGBPLCKhgjetLeAtt8rvRibDzus4B+qblJn0Trz/QuoUDQo7NZnZRgI4idryZvf69GUaEiNsMzw20qK8ELOGROb89QT/wZix8ZntRGyZ11RMFVtBOUAgNLwRBHrD+zr2HuSecdGsLfbr/zMApfTJhIpZraSg31mHte/fd8zGktFco0AFo+6mOx26D3GTje1N+U3YWuMGQm4SEJza4zp8cUDKoUN1rb0Et6ckA12mtOBzZKgxazlj6mO3xxTmqr5BQDQA/ET0DG1xM1luYQiEWO4nHuTPOifBN7LXEVJ65KDLB0f4fe+MOSvp4BmiFsTcnXyBZ7hIUQ7209lK1PbsMEJeD9HJkPxbUtOFiGjQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: /81NdOgZUoLc083KZoZU35YWaebDXCWosimZIRP3eCwu1lLKFNlk1D8+4cjwimwqBjf7axIsJqb6YDScBDToejFbVZvvdzlzOfrwUSnHnHf/1sK5CyucGmbzfkYQOQ9L2TQHnoOnWw5gjjHdyRjAkVulqyXVwMV+i5RWJlr/l4N8n55ZYwo8gqWZyT6pzKXq4bWdHR/ddQ4RXxRbgJREHiNLAt5YKBYfk15YywPn7/vUCmFgN26Z1hlLYtqyIseEZSL3o+U5gCxbqpBbfNIIw//D7X+Bcg3HIdBhfD7U5vfZaFQO4Q4H8gz/u0NjR9OXNHDhRWkUc3F0bXnQ8FjzFfu9+zH0M5lsQ5ga0BEM82aAJ1nPNIGXc8IHGLj/8in+MEUF2vTVLk0I6RJpVTC1OM5Uccyx0y1I4YQsLNV4h6rwxob6GHiKQMC89yHuQCLrBo8JzJ2P8WcDVRPm/MrFSpWUKzBtvi1/CSxf6GLKq4HgpPQkPShRvW5BDX0tmHbVI/8DTR/0jcOBeXDwW/kYmVrv3wbzB/pM52WAiT6pGzZjLjUlZ33+y5sZ/v0KFGK0mgsYDTOoHOYGFT9B8BumfIvIaFD8+C79s35ZODXkq/c= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6d394da-f3fa-4554-57fc-08dc720ba38c X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 22:42:29.4533 (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: 9AhAvQLA5lRreL5QA2PJOomDX5hjJyriQbcMfvYdGL1uJvmqtYvFRfP95/T+UHfIgro8mdNkKPM7YRGPGgOm8d+ZbVgk3AV0MP17V4GaB2A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-11_06,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405110171 X-Proofpoint-GUID: aNU--I9ghyjQYWSvjxwp7JzPJzc1G45A X-Proofpoint-ORIG-GUID: aNU--I9ghyjQYWSvjxwp7JzPJzc1G45A The CONFIG_BUILTIN_MODULE_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 --- Changes since v1: - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES - Moved the config option to the tracers section --- kernel/trace/Kconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 47345bf1d4a9f..839a56e971cc0 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -188,6 +188,23 @@ menuconfig FTRACE if FTRACE +config BUILTIN_MODULE_RANGES + bool "Generate address range information for builtin modules" + select 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. + config BOOTTIME_TRACING bool "Boot-time Tracing support" depends on TRACING From patchwork Sat May 11 22:40:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13662547 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1139A1F5F6; Sat, 11 May 2024 22:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467394; cv=fail; b=HAiDxfuHRqMzzJ88f2Qdl46zwryzdruJA9Tt8do9rj0X9vol41IjK/9uEuWPAGUxYbo6pIFUxSHkCk6jGotlbbDzOvLEpyY2N2nP+mBDOIoslr0xTTrMRVSM5+ZtWaICL/XBqOljgm6+qIPTj4VQNe1JQbtaDvffUr2sIMz3KVk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467394; c=relaxed/simple; bh=w25XWH4uVOaHi9cPWWtoshai7ZlQnKzdqlLFYnl/2oU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=jG7K7FNYJj+28ggkzBOLNupPHbdr60rlzDaEXjYuYk6LYxTrWlRsiPGx4t/UxSo78gmRiITmIsl5KfYlkACPrQ51lxZXDEtYv/+zQ/9kQRiU0UukESSAN/ePq6pfnIFxNwVGqgaSsPBuoUDh8IJZhRzxUVkBfldgVSCeCERXhsg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=KnfxhLDr; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=xwvMVP3H; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="KnfxhLDr"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="xwvMVP3H" 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 44BMVvJr028246; Sat, 11 May 2024 22:43: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=R9h/Myr9EnGDUVmUjl0iFjhTIfEaG2vBvC4y2xxuKFQ=; b=KnfxhLDrtGDPQdJWaUSpjNliE500xrrE63Qwqntkr2e08jpttctDCCmJdv8wKrPLp7Ye XcT97W0n3UZ+Y4VROOruyh3MROtVi3XjSXqnTyspf/3jdLo0UlvZA0BnzQjkS8mjKOBn s5YbrHAQgLKMn6XsrsWvjuzwnhpCwC/0foDIsQWVTtl7Cct0Rs8Ea+Q4f8rwu3YQMP8p IyORXcMxV9OWHg5F2dbswL1MUDi+dYW6SVAG8XXIKODnDuWfLMXxs0cele6GNUgFOnaV TvBwkZEoC5uETWA66wWmeXre3qtijTRoAPD2W0slSM+A6/xqItNwLlaEFgHd5AnEqycE 6A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y2hhu805e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:43:06 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44BL2925022375; Sat, 11 May 2024 22:43:05 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y44jej6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:43:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d8lfI5vFpvZ1IHMkpgI++1c0ghTVCTYyv7UsFEHOxYFd8kv0x3b62adQEdz5vaBcfwPbv+F/n+ZWzXCW4Xkb8dSXXGqdXMjUUot4mFlj1Nn7AA4PqDK6tBPFiLWA1sLtiRvA8QRTRTFw3LjFOHJ5G2qsrHc/bNhqTZ7CsezzdMeFOVcVAiJVy22fYn19eJ5t/qWZYtnrcdsj4PV1BsZVoWUkuFIGYihqhy42qYHGL2jPgcYydqr8HDL17abR0/oZZDBtQLI/FIS0CSQ1RbcAQTxXc60Ny0tooANdjqwSFR/KOXdI99B2039oK4QaWXmOyTxDWGGSepeqhXkNwI9Dyw== 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=R9h/Myr9EnGDUVmUjl0iFjhTIfEaG2vBvC4y2xxuKFQ=; b=fm2kviuQHGrf5kJG08NOXUDD7p9cYSZwIyzbSVQtWy94QDpiekCYgjXyA6ZNxTQdhS1AZWKmwCNJkrhUZZWF/ZUqZbOrX2S57BN9qeVbH8bU3IHE/FLcMMB+dgk0mTAg2w5kXNlpziVVR4qxZBCEr+wec8j39tvsGnLGDolWyudBcDQFq6K2XSbR6TuEMNLSrIYxGFjA2QASdZ7h9OX8AVx5y3QqnyA7E76rWyIL8wI1teblRr96ziqwL/GfLVExJc1nkYv1Pwz4H78LW0kZMFi9GRUiDNr1s7YhhCW/JzUjhwAL3OAToj9o9AtnfqwoF+VIT7CtxPeK7xXbT1XPlg== 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=R9h/Myr9EnGDUVmUjl0iFjhTIfEaG2vBvC4y2xxuKFQ=; b=xwvMVP3HIM5uq/gPWaBAdJVoD5CF+KceR6mINEEP4yOC20fw98b4gbsyU6F9BEMJTiircqX4TdbqYEHPWXYDFjaq11Ezt1nCGiblhGbTmn4UG3KQ9sjnF2P8mrZHzFiunonPuP6JWpwDiIpqmvCm6IxL92QftkO3l0JV8FH1+vw= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by DS7PR10MB5184.namprd10.prod.outlook.com (2603:10b6:5:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sat, 11 May 2024 22:43:03 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 22:43:03 +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 , Elena Zannoni Subject: [PATCH v2 3/6] kbuild: generate a linker map for vmlinux.o Date: Sat, 11 May 2024 18:40:32 -0400 Message-ID: <20240511224035.27775-4-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240511224035.27775-1-kris.van.hees@oracle.com> References: <20240511224035.27775-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR16CA0043.namprd16.prod.outlook.com (2603:10b6:208:234::12) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) 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: SN7PR10MB6287:EE_|DS7PR10MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: dbebf08e-f2bb-4d76-c9e5-08dc720bb7dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: TARvOV/z1sNv+LZXApKeML94g2S2wODxCv9E7/7e7BayB1lm+gUPwfWPmEAEm1gh7u2F9O0vh4leMzuv9WGYUCOCNBCkgZ5mCknl+poH3VwsQp+RO/nYGDPxSKJZrSKr4I5IQyA3Yc80mPPA1ZZOVoNek1eZhYHk0W6nalZzH64ZRTFsupOMFQPJJ/ib9MpLf9EcNkBr0lZMAVyNeeycyarPkpg3csaHmze9xBgarDIxUbDNnt/WkwAJTgMtrRJ1pdRPRL45Gg1HPpcZEqPtEzYaSnvB3wytqyMbgefiE8qDTBi9usTsB+Wm9s7Q4SW9PONlLw6FCchMj/azGiq8+0WlK1jeZBUTwPVIstrfW67EO8EfGuJiKthBaSHMQHZ+T2qVOily7x66ZKX4q0tZuobyEBf3pnoXgxj8rZMbKEdfzMjWeeUeUsx3Jm7i4yGUpEz4+SNHWpFg+VPSc9RvF02AhVtXcrZqXNzVlSSohTqwERu/6yXRelnL3JZ65UjGo+i6kadOG85AlQSbzAKAiHK6cv8cXHgPk/dvTzuREQOKIZlpiW8LlDqQgREx5lp0Rrh+d2DadM1hlMnPNwhXktWTf4gwgm7YT4oVmWqF+YmIZmcPoLl+gEWlZRgA3GyEBZ/57NWAn+h1zWwGBegNx8P1ofaaeOUeX6xLC8bkBrdj5bpTiK0Me0WG+wy9yFBMjG+OBgz2yF1vMu1yD+r4Lpu/Ji7vjhx7Rg3s4QYlH5Zs456YNjJzwhQ87YsHhakIXZAttLxqLALvkm5kdvFwFBUdCT84VFzvnZn0SoLFR8CVpPVvVACMKFJd4o3ouXwFQeFJO4BX8s1wq9L4RZWzxfFeDUHx+ardrvVROJA6FDUqGKP4sTlUmW51DdgTZdKQ8oxBUeeMKbdn7OEE/xITda/mDLE3NrOsBwAKm/I8IFqlU8RAPUsSu9Ty9eU0ByaJ0ooeeOt1WSmxcOIG+N175BqrV1JUEeXFEYkOUiHx+bucN7An7KAPKak6yME3TwIH+zg/x3dzxJNCh2htpXbOEWAg/+wBdWMM4xLWe2IYs7E8LrYVvjVNnrFWHzgp5iBdLTxwHoeHcFOAtl5WqGfMTtsbdNCAYYegStAJw2Kue2/cltzNGqI0jZ0xUoccS1p6IiBbgFtmDz21jzWQ4DuXeMQyAbVdGRvVx8NWHdND/kUtNMxexobDaSF+89LjV5P3QwiEskw7TQXHHDsc2mocEEfDHbwCy//Cr3tiR1pWg/BaA3Ymu8IKsYAUkUQc435eRd52wqQZDiN/kVNaO2C7UQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nd+J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vGfRsXsuGpbPPFhrCcHoiSQg18N/NcSHbdpcSCYJ+8sa3+0FMJRFVeLUw7i7to3ROF1/00MaA2aMf5+9HspxuTVYJk1XJ/Pd+5WScvRoWIJtTm1MwcclmQwj4FLzl92GrXgTYLox6RPaVGcpPfr+V/2M+p4JYdsr2I= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbebf08e-f2bb-4d76-c9e5-08dc720bb7dd X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 22:43:03.5492 (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: macHHg0pDa8FL8oIq3gW8XklnMMmqMWl8le7B94x8o1pQ9UJUAGBtxiXVg3ITgKAsd54ah2n2YheVETBIyPZTohHY8aPSyT1ny0lNiCU73w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-11_06,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405110171 X-Proofpoint-GUID: jUTHAVBN2C5w31VM2qqsx5jADYgSZj6w X-Proofpoint-ORIG-GUID: jUTHAVBN2C5w31VM2qqsx5jADYgSZj6w When CONFIG_BUILTIN_MODULE_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 --- Changes since v1: - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES --- scripts/Makefile.vmlinux_o | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index 508b3294e2cf1..e4a92838780d5 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_MODULE_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 Sat May 11 22:40:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13662548 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 917AA1DDE9; Sat, 11 May 2024 22:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467431; cv=fail; b=OS8BJ0MQ5y3qQqFb4HuiqhoDkjrRjYWltzghUG9jTXObVZo/Apbj71Q4Jycuc9Bfi2iCWJ97qAgEUBaooypWvnGcJvp5btmfNsQROgqpujhPR0a20Mun+X8R0WSpGQNMMvZNwO65zd8puKKPIjzR7YBjRw9fkQndbZ8QB+Ct/Os= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467431; c=relaxed/simple; bh=2ba3c4KvTWaO3iw1OTRTy+wkumwJAh2PxkieTUp3yt4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=r9jzEUKO9YNkH31FniMk+IuaSBk0eIlgVry0vKJtAzZsg3wEiSvL1P/g/4iRQzZkeaSQ8nOLmqk4MEv+0D9ejdNd6y0AzAmS/OT4i/JOikY8wLQjRPJc4h58Is5mtBW0iV8/KANPxgmUKVspK1IefWytcuZZj29OsXuqE3kYWto= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=i+iOiTKw; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=AOFnULqy; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="i+iOiTKw"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="AOFnULqy" 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 44BMhSob010025; Sat, 11 May 2024 22:43:44 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=ibUgblhNVWqtyNJINxj7/jQRYmpXLKPpoF2q7wcbtt0=; b=i+iOiTKwaiiLP9hwL3h/6e6ZOiwAZH71paJIHFRwDRHAvGKoPpwO2+16WZ9HNVASHM+x +BLyd25mQIcUrjN9HPuNswjJ8n+R68PEL8RRdL4IKktfizOLYgKu+q4ruV8MlqArVUCH DwkinuDSpcsVH35mVLcuhrLlaC/gPCTKF0Mid6pJAqDNByped/y9dA73Wi4EAXMR+fbz LUUhy5DDdtQhSXZaEEHmU8gkUStz4d9SueX3xurjJMWIXv1Ni5bA41nS4CvgIW461FKV siFQZliBW587TlOAg0BY3fP2RYbd4ZKYrsZwwM7BysnpFCDtQ+yK/luX29UWajFVAzP+ vA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y2grbg100-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:43:44 +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 44BHeMOA001707; Sat, 11 May 2024 22:43:42 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y44h6t2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:43:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nVoLHzLT0rq8ZwkpZVHTbqGhHhw54hxm25dc7dA02z44cGBl27fANJm8SBbIbzd7Q/3eim0UEvSiYOpuAT0QtihG6WU/7JnCMPfmh2dJtzBIvVQBIjgSrTPzAI4qyCbSahkyPU1VYMXGkizUF9HyxDZEgFMtE5wix4PVVyAAyLspnQiKxQNPjiSk4QF7Pye7bIpvA/2eKAR4ZcOP7BPve6DMpsHWSp99uFgQqtrlIulFdxAnHr6v8r/eYpLT9P8MDm8kpZ1/czy6oRjvkyKd8b1BiHshW77jleH0+iIsVC/nxskt0vSuXN+N8hsoeKzJz5y6a87+YitgHwSGGmc/cQ== 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=ibUgblhNVWqtyNJINxj7/jQRYmpXLKPpoF2q7wcbtt0=; b=k8W9C2bvUZcS/K3mccUIIXE9Xt4ejkQpjoowLUtoptP49FFrigS1KoMi+3fhjd60SAbSNnR+vbqFpe5miH4IyoIoDAMSj45azTUJgkWw3aD+Y4VEyHd+Yd8DXQamQHzp8danPyIyTn2NqF/NrvlREI89jkTDSSvUHE5ydsNA2W8XieEW5GuHqSE2bGgncc4Qq5yu+OJrZgsv+Jy+oOBc8hOzbOTKHFCRsUWvqg+Hwf55LlWABv5DstkdWDH+BcJSwkssTh7bRhnjCgF6CaJHVdl4pgjDcrK0YYENR+FwX62hCEIyEDJdqxnwnb0UhuSRCprIOFl+O2TO4n9TP8jQnA== 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=ibUgblhNVWqtyNJINxj7/jQRYmpXLKPpoF2q7wcbtt0=; b=AOFnULqyTJIEB8UPfH0+8Y6iCQKc9IwjHSuMzMhkIRfgvwW0YiODslc+6SRSa8pjIqQImtnWK5vME2pS5xQDgnZn+1Mi66Z1+jERy8hNCpgAc1tJZS/VCFZNb5NtXXoBwB8/nel7ZESGOXkPoEEnmenJx3NOMQzPDCucYe70+kk= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by DS7PR10MB5184.namprd10.prod.outlook.com (2603:10b6:5:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sat, 11 May 2024 22:43:40 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 22:43:40 +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 , Elena Zannoni Subject: [PATCH v2 4/6] module: script to generate offset ranges for builtin modules Date: Sat, 11 May 2024 18:40:33 -0400 Message-ID: <20240511224035.27775-5-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240511224035.27775-1-kris.van.hees@oracle.com> References: <20240511224035.27775-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BYAPR21CA0016.namprd21.prod.outlook.com (2603:10b6:a03:114::26) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) 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: SN7PR10MB6287:EE_|DS7PR10MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d728b5b-1d7b-4f66-cfc9-08dc720bcde0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: oEDIVcSBT8503or3F2/bFIeATwwqGg1UuudfEB6hRovLvmuKmTRkv3qD0DEfVpH1DDVTVdD8RjNCCCxa7pzLrk+DBd5DaP0B652w7YTf8tdf6i9LB7wXdZxnFd7TwH26eF+tMdV4SMjeYtJC573lcg0lpsseaS5UkdcDJRd31KfPUL0JDud7CAG7/rvL8+SYX+HXt6LXxujJg5J/OG1o04YOVVj79BvFFRjzmS+eLFqEKsQEcGZPYT7PNL+yPL/L09/lM39xRJz4b7L80fgY6R1BqGxGskJ8MZ8bDYdSFY+aZ37uO16sZHIHz7UspGLXbaN7dwJVbKhYZrwR8WDKaV662+j4nJeh5O9r5hp26R0ng0cLdEEv3DrrCfuclIfwf9my6vWDKvDovLdxK1MQRdQkZSusCkzph7xDjOidfpBxANOCDX+6Wf8mKBJJu9f0wd3K5gt2E4ywar8YVwHHRs+L+Y6twVOrV53JQ1zAkECUDknAzf4tr+oVn7LjYHw0A8b0cA/Ykm2xlAZn0/spv+HWgMEPvGKkDelZl9PmBaFCn6zPq1lJpPsiLbDq1XpNuQXC0KjakEyX8/LDWQOHsP6/YcutRJg3sIED8bQ474F5Ze5Z9VdQS6FKHDkrNcoJn3HHQIWf9vxdqAm0lTgEKAC6sag4z7xxqvjnFxz37uPBeLgpFNyAPpDzPQP1zSf5drN/9ko2hCzCdTo3iaBsYbc/7TMYeNw9sPjvTw/ELHD+h8bdCb7GOaypSg7+8OvEQ2OO94o9fMqVxrZOpj72xm4WHL6gjYSbl0OYXRWrcYdOCLEZ/JDIVuRljHJ4O4Lse8xbH9cTzoIvmSszSnsDPDqh3aVNXe2HmqZiSgz5HnqcNLE7u4RAlPZvO0Q4fnwvIdSiRy6VDFS3/HeH/9qnPCXobyNL6bE0MECgijh9TXuAmQPbFIh0LG45kEQfE26fXUEi8Oi5f05IofAEdDn+VM5i9Vsq6XzA3oLGB9MQbfFfxEOEiFSB9xg7FtoGAlbOXAjs4L3m7KcwfPr5aPzfxOcNuUFM5ufMTXndx1yfssFp1S5DuxpDk42S8zxs8YAWgskWjS+IXbAYc12oqrhZ83IH1lefLPQeBapSlUNYH6PhTbsBvw8jvfWeNba3PEUGzS97uRbFgOYRH04YuTrDxLcBz7uJZ6jAfSNAbFg3SXZBRDH/t7xTG99FC5yq2CQcN5VRp1yWeMqs36fk2e3+5GF54SkS9nmgr1aPpkCIlYvJfQgaAe0/mINs8MDmvLg+7/Q8T2YNf8YntuzAiHa6KA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4+bhG52UuyiLWmDl2zURmxzToR01Bg7ynZfGtrIB3jtYgG0iQKOdiuxz3gEfCsof51fsBHjmDCQkItGuCDW2G7LN+ADrjWhwb1UXFIbHg27wZTBEqCkchOGcZSak9YHdzrMa66W6fKz8hTGEekTGZZVv+9rRnI37z4JGpgreCH3xAxOydztt+9Wn/tByzQs2/EnBhHD9JDh4fyBylROpCY1hVQXwmqpkKNT8sdf+D1NyK33kj2uA3epbPF7bkz95U4As3A5/45HTGWDh7oY/K2QJ8jRhqn8YlRLBTowkTqelfW+7vyPGV0anI9rwMDS3dC/WjbsLf6YYvEnAytOWxDaLZrVJvpkCatWNBJBSph8lAoLL+zd+NTi+EJrY4zL0T0YXO4FtXHHBBdtnpd85pWkie07lfMLHEvrUnHzaFPxX3rlpaKlCnEABfCyAIM4bzb8Q+8ZyMz+9TvXP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ohT3Rp57+Kk/zRL2hsEw4/9iz2G4fA9Heen9eG7IRSUHa6AgIzHZdabflTZnYzhLBmA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: FeS2l/wKAjZS5cgzEzRIHgAHLiWQ/nYZt3VfazmyPOQSQrH7rN9SCztgI/PzPQ/QIe73l+JIKhgY3Q1CzI3IqpxqBlVXOSr/azJ31rnVv++gFwcPh9GdqizAhcDhENvyTyMZci0vbLuoPEH7v3Jj8GG9IhTCIr4lrYZDznH8JK/wwWyKhueJGlyvA9DCJbt+FuVz3R1jQS6qMJlKzR3B8mfHR9o+/w5tmane8dRH7dg++AVhPatpA6bFz4rO2OUYK1uwNLhqU/eUE9aSPJuEPVavgQdZ4j+54NPWdMCmHnBqIyuR1jA2Bi3qVgiQTe9e3s3sFAcVoDOv5rMPDvsm7C2OwlTINvLcxa3i+DSvcOcTuVpFMcWXZ9LVWyTKwIWHMpFepqIY4Gjwa2KOTAxClNtByL/Lj5sZugOal+pJ7SnQ54tfXNcg/yYhcgNkG+7YdBQ5t+mS79YMA7nmQdqdHEHBiFBcP0f8rtvyJ/mOzjawpiO/oz33esBbAXdYSiAN+w1VrpxHCJJ9ZY7QfmomtlS4Mcy3nr2A83jXFGkefgp+S42L980VaJPYWmdZ1jop8OcRdi+dHsSHdmoyMSACofrz+0xEy35hezl5MNWa+rM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d728b5b-1d7b-4f66-cfc9-08dc720bcde0 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 22:43:40.4693 (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: RNv+UAphJUcxjUmQvKdYnooazqeyePSxiuZSOiLurKJd6BXCdD3A3n8PpmkFegWYoBmJeUvuxz3Ztpv7bOtC1ELUJACuXIxNTZNrrprnza4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-11_06,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405110171 X-Proofpoint-GUID: _x2xKzDl1T_IsNbQELeUBeoBzdimXOWP X-Proofpoint-ORIG-GUID: _x2xKzDl1T_IsNbQELeUBeoBzdimXOWP The offset range data for builtin modules is generated using: - modules.builtin.objs: associates object files with module names - vmlinux.map: 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 --- Changes since v1: - Updated commit msg (vmlinux.o -> vmlinux.map) --- scripts/generate_builtin_ranges.awk | 150 ++++++++++++++++++++++++++++ 1 file changed, 150 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 0000000000000..d5d668c97bd7f --- /dev/null +++ b/scripts/generate_builtin_ranges.awk @@ -0,0 +1,150 @@ +#!/usr/bin/gawk -f +# SPDX-License-Identifier: GPL-2.0 + +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 accommodates 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 Sat May 11 22:40:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13662549 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34E06A921; Sat, 11 May 2024 22:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467463; cv=fail; b=r2BIFZaj/d8mCwl13HTula2gDCk689pEP80L+GKOoMoFM9G92xu4A0bb+J9MeckkdLr8PtbrTDZolAkfF/5vs/iF2b3PLOBjZGe5qG+jOEzbQlCrrnaW3MtZSvXqYLDnmXsUNi8Sp65U6/QKsUDxEIW0BNQ7eK2ek6BY88oCaFw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715467463; c=relaxed/simple; bh=qQ7efqJN+WgaT9YWgUjD+BM/7P9g7yPH8hAoJp7C0wQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=JAmaM/fabFXC+OY5InLYvZeNKpmwkBqTJqxQNnxI7+in9XyVPVSsHK3iaddWYC/TKy8I9qzvO37q5yGo1Lzi1lb3Yh44YcO9z/XQXrziGPGqL+an4EsU/2+2pS0INF3mQK1xGCVcMFO0hTTiLw4Vzv97BLbw91tb9s1ESLSVlBc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=aIb5/gj3; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=PSI7Z2TG; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="aIb5/gj3"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="PSI7Z2TG" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44BMXpSx020928; Sat, 11 May 2024 22:44:17 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=soqCBnxEsRoJ3i/M+/9PD/PZDRGrse7bEFnc0Ua8+kc=; b=aIb5/gj3pD0xCc1jzzd1c6Fo6b0O5uqrtjcuRpcS5rrpfOwzoczxv/jXaStIF3qGkyXe lxebggv+MpJtY9L84yBM2cJF+7oxeQNMWewlJ/hpS6PTYTHaijPJieLGQ1voclbj16Nq YiOhEkpV97wxKuC7fivFXVUWvLlBmVqOgV6/PWImFPKxwvI+pA6S6F88Bgc7IL3OhXrl XMx8KlOPJbMMJMde23tPWOleR8i/lO0ERy1JVktN7ypOXqO+Pn6wavh7JPUR4UKE6SDG GWlIImXQNAI79avtwI50IR5/gYXWdzRfaLlYiRHnsKR0eL9NUiyspagOzV1g01Qs1mrg UA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y2hjeg05u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:44:17 +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 44BL0dMr029424; Sat, 11 May 2024 22:44:16 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y44hgkc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:44:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EB9LJlNvKe7hUtrggSus55xEMIP05IqV4q2kPMRgD441gYh9+0cilB5fnBcsLwhUvvojuq1fIvRHJZnkz2e8oT1dgcX0AGAISx2vNUjL6Nf9ZIgBpHzBzalMgd/uO8imPsxEx5fL2j+P5UFuOGvRf0icx6n7JJj0OAS8fJAHnXKgldsOUBJI8yVhSoo1n6Yik7YpdPj0/ZE4JIB1/+C1WSD2IjemBP6LqAm2ZxszYzrcnVjQC14hFtst4dOFilcEsFgY1dYY7fqvJajSunGR1M69mQMRl2z5q8JbDJrFvydh3VdGNmC4dG46+hOFr0o8j3sBdRG2+FdVzq9Gpv8qlQ== 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=soqCBnxEsRoJ3i/M+/9PD/PZDRGrse7bEFnc0Ua8+kc=; b=NktFc+z1Vxp15V9gln/Zpt7IAxwUgKQoPTYMhaFMUWUiY00C2WuYAXQWJBVZdhwEmjvcLQ9VpaRpqGlGlibe3T+Eg4ByLynqV9RQW6wgkkp8wLKdEDnUxrMH1tGjyvg+Mqqyl5qj7FqzCzngzMuj/cOcHO2eNQRSs5sXSbjxIVZhLr0yopvIlrrWIhg1Kyfk01SJU8tdobvv3YWAJ1gV253u9WHdA5eJcGDsZB2+YQMAtyh2h2493aiNvL1Io3VgluiSYC66856zH7Yr0lm34iw2VEng6RN8DM9/PT/+Y4UuxZX8H7v28Cl0eKmGvicqNn1H1dTXsPk9Ka7sN1HhFg== 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=soqCBnxEsRoJ3i/M+/9PD/PZDRGrse7bEFnc0Ua8+kc=; b=PSI7Z2TG13GKHqH3vV1a1b51f86ulDgPTUcgJ7Il1441y9/ALsT5wS+GoelcQeoC4l79fZTmeJ5MDmRpAtiMXt5i2Q5JSNzkqhvYqvoK3b8+uR7kGPJsXpHCkEPLdf/gmrEQCcBoi/fD4+V3W8shQGY6CuBs6Lkzi0rPjqPoyss= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by DS7PR10MB5184.namprd10.prod.outlook.com (2603:10b6:5:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sat, 11 May 2024 22:44:14 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 22:44:14 +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 , Elena Zannoni Subject: [PATCH v2 5/6] kbuild: generate modules.builtin.ranges when linking the kernel Date: Sat, 11 May 2024 18:40:34 -0400 Message-ID: <20240511224035.27775-6-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240511224035.27775-1-kris.van.hees@oracle.com> References: <20240511224035.27775-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR01CA0017.prod.exchangelabs.com (2603:10b6:208:10c::30) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) 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: SN7PR10MB6287:EE_|DS7PR10MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: 02a3d38b-ca6f-4850-1439-08dc720be247 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: Sdk7LhsmYTTAjk6Z+dOyEmatFfcOB1tAZjKbH65Cx8RFfmUoSsoqTGUlJNT1i63/T0XzEgqJZISFXXkA7OQsN9qCSFEadRz4ODveZAwcS9ug0ziExk1gmJvGAXxvH26V5JsumkzMGz+T0XJMlfhoCI9dfySGU5PPITSjBPYl6GgYqpQlWF79kibNc4lI0yosNFtdIvyed9xOBiaShwSVExt17l0h1CjWBtejf1gdV+6MKcX9CauR6PMtEqsdKK2E++0iWiHkUgfTdJYe5x5oyX5uybVLuODf/CO+d2PpWBoXuvakyuRRVbeq7C1eHE37pBLC/US9onbx4nh8DmG+s8fSHO5+L03PON88rDcuYSiGFLtMvfu3HmZUO47RAedxFFlwwduMXYs5VZBVMbZz2qCG0kztE61w0iEAfZp8P9z1agZ+qtceD4+/5viV54Jm/gkCIhy/+V9yUJW/F7QgXLNS+0pJGz0nsbMFJBhjIwHM32HDrGgtOpy1xMiIfdnYxoAhPQ8yelKgocoMSQvOgAUjbWiUBZwTMAUi/Pv5GC8ezqH7u00gnPAyhaiJ0lygk+B4f6SJAN01QEFdKWNyvYjTEij5dJB5iMBR6uqyWxvN8Wc0SlvECBZF0wKKru/jHOfZc6JRe+9aIBpa1kzK9vcs2xjs9+J+lozQnVmR44mOd7UKYc4eZOmVGhhSpekmcSVOI9WB4PVNKEQzAdnyDuiLptnQnR6+v0WlE7A2IiT2aP53HUKjEgKv674gx0Uarh/HottR/rUodlkaER/6OHMgFqbmq/ejwCnI6Inm3QiZL47PyGFW4hm0i9rTBXmOzjycoTtN73PD7Mb3TkwlVXn87b8ZwAWGTy2ToGc9U65gME/mCzZ0It1V/VkgQdzghGflCmhaz2+uzfUKGtYhGosSjm50GQ0HxSb76DEmPAJMLqbvENCVX54EAe2lSp0xQnerRabIDCFHVRWuH6PoQZ6r7KQLe9Hm401dYIXzLGCYkXJwrfgwEFngVhj+prlGsow7Zo2ifzR8WR7ssFfO2+KCfjYnX3wlyg88itjv0sbvylDc50qXeeE1+aZ9b4azyUVxpUcqZ0C1nNL4T0ZIKGYg3qn8gZdSNqXJpGJKYculzpQ5GgJORUUbNnr8rmakfWql9Elb+2iEJvrQVA/x/DIvXHRlUQB9e/ztcQZAJAKrD3QZL1AC8NzXEBxEsX7CkbEIEdTEHGlUmuN6R7orUhu/adGHkxFUtyNzbUhJ0FDNu2/rV/px5GJ8Gq/IRKv4McnAKzSNoyZesPJGezx72g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5F47ryrTDYw4c7Iacm5COtB9HyUjzXQ8u9zsOMF3qcTH5t8ZEwE+O0Iz2bhw+MUtLkZfbc/cSkYzwmd92NQz8sKwTC/bFPs8PmYsf1wuBX2j575N7NrW0xpyQk8csKyzZ3lxwiFW04ZJr2en3KqwbwAbfY3U/Q4IEOi+s2AvlHb/WlNyKp+58D/r5jvF9l5lH17ny/dUnoDN1up/4Mrian/s2xs0UXGmESoY+C4tYtBasyFRbWAGI6YSFBBff1aYbaAI6dA6xhcZIP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j0t/mJxLkJKhOYvLeIODR0B8Re56HuIRZhFWuUMnkW54otpJ+MTEYixq4orPjI6aI19A5cI7Cl50YlHSlxD1ZRzM01T5qWNzU1GXbJ1QV4ikhTQ6Ioa5n4HHYPoSxxxZyda4O7qua7rZqmWzmZboIeQ09T2oEWUacfbSbeK13rR0YtMOwhyCoRQGJ9hK5dFdBwgtz6vVJ0UMLnoOf3lH5KWTyiodQPt+79XvCNbjcnd04wocIIgCKM/qLqbTHfjb/9wXo0EbC4Vjjdh+J7Q== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 2t1ZoCulJrWhk4dOoyORq+JWtyhzFq0Avxn2QSBJceDYYRGU/DBL7ukRYaSOyOJ0OL/gmXwCE5+nvS8cFba0A+kt/WDsDn9R8q2XfWurYf7mLTQG7UjX4NGF5RQIgIPGJ1V3UUDrFgMM/DKSEgZCqytHsGuj4QoqKrXfUr21pneLeEnHMStEoFa6DH+Q8hF+3z4nmaxu6f7/LZwxoZM2VTciw5B7WGgqIJbnScrPw4z2pPnMFSS0sjhrZfiYsdB/SvOr+oyRs4jTWH7vKQCICh6+d6h/G8DltIohfU7KaGlUrl4yBFS4B3Nsb8FqY64YqxqP0KoK/E4dMY7p9ohegSpSC203aOX6VvPA4denDWJGRW8aEIIwuVbjO5hi1ZKon9fFnsRIZKxQxLmqReOrfhiq0gU2W7y8MCEQ4uaN3wCCxkFnw9XwJXAlgrJY9sEV+n+yJXngTgQpoUO1e6Vr1tuG4jxKOyU7OrhsfF+7eA+PVAUDxjBR8sDG+BbqjS8YZwAYeRtGMZncMfA8vdhOXLaHDntx8SXPV8dPSXr+QfPaE92gEsbvftPWUS1+fTDut0O3HFhq4sp2NLi4eoZj2x1MDTJ14cgpwJMF8PogaGo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02a3d38b-ca6f-4850-1439-08dc720be247 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 22:44:14.6920 (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: 6NaweVUGNi5W5cn9x2l/5iMmjUoX8r/5pxwWb4QHLf4s5sKQfNsBIktMCcDlEj2isBFfPXlyC8+uPi51BNga75yE4VIkjvfP9mE9sqRTT7I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-11_06,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405110171 X-Proofpoint-GUID: i1DxNEvnWucRTpApuQSIr12UcTPp2dGO X-Proofpoint-ORIG-GUID: i1DxNEvnWucRTpApuQSIr12UcTPp2dGO Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v1: - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES --- scripts/Makefile.vmlinux | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index c9f3e03124d7f..54095d72f7fd7 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_MODULE_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 Sat May 11 22:40:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13662560 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 386A017BA8; Sat, 11 May 2024 22:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715468345; cv=fail; b=HtulTdT6CGoALJQ2taSNVoxz5zDnSTqcpv5CKjCpNXyLp32iLmSqa6EgJzt5QDsMc+Iobvh7p51/3kLl2TcToXPM+a/TsAcByUVqvu2matjUzOYDqncwfR5jkN7w6F6DfjEa9wKwTnDgxISDsLdXUkekZbM2riyyU4auPJ1nqjg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715468345; c=relaxed/simple; bh=mAOEOjjZs5e1I+92Zs1egJQAr/+kaFeeHiXrknwVcrg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=gHhUF1SSrwE1iRjHOCcuwhO06yYm/MCyIbjUo/vDiBRqe1IFbDDzUJiOMfGkqIwnC2LyP42xSvCPIX+XrwACLMnJaU67No2ivSzPC/VautxC4nKCUa8Usfa9ntU/Wpi6bCffE2YFkKmSe3c5siMzbO2y//naHW2nuz7xeWyM2Cc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=IkkeYwrR; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=fSKfwhdl; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="IkkeYwrR"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="fSKfwhdl" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44BMwUB9029735; Sat, 11 May 2024 22:58:58 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=rh08Yov6aik6CwKNcz13/k3KqUSXoBqB/kh51PrruqQ=; b=IkkeYwrR4CE7VQq3Yg7ZsPC5Kvzdkcp627veGE5Eq9/dTlhcS9Tz6vtOvpDXEPaMiYE6 98QeiYYBf5QYvuhw8sCI1GrGpBMltQbz1G7iOsi8eIWgcDhXDh/UWstxv0zbMNEj8u0A stgMe98C0RnIJWl8Eu61RfiCaLA443p2BJA4Su9khvoXvkZ0Lw/hFbyOUXmimh+WPpFS 1X3KMVhjdV6SPJ9I0SlAORZpzURHg9brTcdkxFE1sNGaymXPHElc3fwV/c6qmv8r6BOi OWZvX+d8dgpZ9e9C3dIknLDmyZMDVtpoYAcRgZ6+NmLDLEfP4fBWVJPNTmA8JQPKoQOA VA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y2g38r19k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:58:57 +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 44BM3mNS001618; Sat, 11 May 2024 22:44:50 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y44h742-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 11 May 2024 22:44:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MR5894QdUVlJUJouyfV5yQGSCO2jXu9PUxPbEmpwYuqYiV5JcYjhsg4QJL0gcWFPuI/ByjpFAvC9ZRKfLE5UHrrvdmsr4de9ddIPDgdNo61aMzZD47C/EuF3pexOWdjjqh0CxxvwSt3fHcbCJCa6rNPwB8G2ehpBLB9QiiG/TA2esj+MWGGJ7f7EBE2vo256Zwb0jXZcptFbSShq3tsomZrEq35oCyWJLuI0jkIjffTVkjkgzAHGjxUtxGd7x2QC9QZ47V8nFfWzaM43x+BVyG+AC3aonqozjZR3FJUED+gJc5W9vv02/sMNUD8oHpO4swYu+x/6hzUhMC0DvIEEWw== 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=rh08Yov6aik6CwKNcz13/k3KqUSXoBqB/kh51PrruqQ=; b=T5MC7N7tYJBH+ANeGAGpcwYbHbS7ZEFIcqE44jxRzROG20w2llnjykfVgOagjrV+69AnFxHhAsR86L5mYTwZK/6dh50xAhdr5F6pt5raj6WN6yqBXfbnE6i8XimcThOwPBGe5c1QpywP7Tqe7rQ/4zavp5zUyfe8A9yA6u3N7p3kBJyx/AkdWeZSTcMjxWlxv8n1MrYYuPLH+pxGKjexhv1iIRLAGlmqLNbXeYOmgRvNrinXnCNicmK+sLcg4jJ/WtOk/vL71PGq3nE6AbR21aUy/KowHJPN1a6kgrSFLkPCyUBzVKD/Y9Q5iPEAsT0dYX9b6/CHf+wTWjVjSSmwQA== 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=rh08Yov6aik6CwKNcz13/k3KqUSXoBqB/kh51PrruqQ=; b=fSKfwhdlQaYtyl/xQwmTEaaoW5Jy2mh2EKhN4Hro/6Ef7ZsDvEH5iCCGzJhNhPhDn5M3WKzEiXnnuTCQQXaktinSArWTzQWIwmATRfNwiVFoZOBX5cFBLD4TtxgiligZd19ph8Apwsk2rhqlJy4zWx4qszRiwwzMGyjudjdcARc= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by DS7PR10MB5184.namprd10.prod.outlook.com (2603:10b6:5:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sat, 11 May 2024 22:44:48 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7544.052; Sat, 11 May 2024 22:44:48 +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 , Elena Zannoni Subject: [PATCH v2 6/6] module: add install target for modules.builtin.ranges Date: Sat, 11 May 2024 18:40:35 -0400 Message-ID: <20240511224035.27775-7-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240511224035.27775-1-kris.van.hees@oracle.com> References: <20240511224035.27775-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BYAPR04CA0028.namprd04.prod.outlook.com (2603:10b6:a03:40::41) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) 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: SN7PR10MB6287:EE_|DS7PR10MB5184:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c302da1-6f9c-4795-7cff-08dc720bf66e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: fzEe7whnjjLc4ioWOh9jig3mt6sd0mndz8W6lQ3wHB22tT7fTpkkrSSD6clQjNgmoqDMALEsgm8mbtQ8nO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eXH9+LPsKxD1THfCh0IrbBcD4XQrYz5dWxzsLaYLVhCLvZBw5qulQfSy9UcNGOKskAKNyU7dN+gP34bsEP2IYRgxr8uI3TMCmrcv9ct6lTvorl1tz5czK+o9LVNz1Kpb/2q31AEzZR21NLA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: p7wxVe1gbmvjoujxZqDescvLxEVI7Df/gT1qSst/jb0jA1EUqDbTQfcTy9HgM+iDiV59f1BooLWhjeWc+FsqA9/r9KtRttIcvUQ3eUi3Qddwhwhrh7CWGhFk8g5uodZq0wGc6KmqAf5EcT4SlLrpdwCqBo67lJziNa0EY+tUtZ2jj/QRVMEnfqCwYCp52Sh8Kryw+6Bcn/oZVx4Qo6bIct+CQOXPGIikZv+1jPGWTRio6eQx/IZXo1aVXS/rQyaW3Vl8GKjjW8Vkk2uBXjwqi1MO7nlYFqtyK0t5dEocfc/pzE8KyjOZ3aTTFSCQut/djtDTZQ1LmTO+nsBGk2rdU63mLc2lfJHLvP1m+HbxtidqBhE0/3TA2X0LHfgnFHHS3qq1XzxDR76+aeR108WjAQdQvzY/WTJOSfreGHr5azoNpnEp2zT73ayTVvs1M+jmSOpTadB+ZACkyi+5PuE5/n4X1BUD/rnJN+NGR55TQ8nyP+SifX0f0xNtjRDjvpHteibobprS1Yt6hf/ZfhaAhv5AmWtn7jgDei2AU3ruMSSOLoSq/yLfQSoV9C4iu1ayLU78gwHlshY53EBtI7yZZa8810tPbBWBRivbi52d2R4vJ+BGPlaFF+qmrOsrPicGtUWJ+4jM8O2BHwrSyjVuzX+Ub4WOuegdWbysD1VSH0piIrOmVSJtWw98CIiFv2hhx6NxdWcfSR6auJwKflbdOwAliFosgu147v8hrpuGv3n73G8hhOkXXr60nvmDbkrs8IDQB/kfSmFut2ip4bjuRBPXGWUqouc0FQ+4pFiX5qVAXj8TM8JyBO7vx0X219YXL/MHS79iNTneTmJbXcGkSkCkfTicg0RNMbXs3iQ8vt3kP3avy/lvWgtwPB72mxchEm3pBzGnkdafCEm6DFyubrTqARwEmqCgW7kJ9PJ557P/57pPKfTh5+VcvAf5OM3gch3TcNDuIgomTJRLTYF8cSbFKfHVa05PWlyID2bbSv89tu5hfH+sCg1Eq1gDzd4CChyYFiqy2tbhcmqQbPCZUkSnoKFN7IZnjFO3uWyNE4gT/CuRAY2+cvqvFolqxqYOYK1mZRYus4WCMaCMhjuxISHHVTW5B+3V42uTNP2cbm34+UvCFhlpBZc1t4grE+hurAmVxBJ87vnPtKuGWNEJ0UT2MXFTjuG9vosobWckCQmbjb+EU3pwDPDxdByFb4Qk1yghNcfUILb6zBLyOZ5iu8Lr7WRGT/pUWQelkMOgGG02mldiIX7X/wqpu3VOHtR8RLkuqynyUeHXSKmnANVSbuvqR14IfbnylBe6pLNfmUC24HeF/jhhEr3crDzSSzmf49nlTd7Vu+8wi9zEH+ok3xa4nvyC+yUCk4UHlixz3gjaVJ/P0atOWxoYNsqDaibzn9e1TD8ncaJhsIARNYQUAZxufRRcXbJU7EgFPOR5YGXR9LYswR95KJ7VvHwwLTiWctxKWl28rNz6HeB9crXHI0v6OlHUsQ65sZSJrV2+C1qSizXHekF7N07wKpat7K9DjBgOaQb62Q2bQocUhGmznbEAnjuH/ggD0+tG7KLrOBJnUqwPjotNbW6ahkWv949MTp0LjDhwWk8NxphVPTtM9w== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: M4BtS9fhdmJJpdU1O9pRzKXSKhFZfrOhdr/oXmHLmoiKhgSZETWhC1tjE2yJojRnKq1gOWzlxcXqNGrD9niWqhqpcM14tbBk0Vc4jQNMLSigIKZoTyTAxUrVWD5GVvbrNoug143+Ljd9EGcVwQM0i7FopUGvHDa9+61o0J7d41v2mblyZMVroQSVHEx0cLehqimJZrjq+rjkqnt8zTLlAjZGM9xJtTFu1PRErBSJM060cwVk+t7x7UrHPWNGQP28m2KOxlr5GyjFxj7kIHQnO37Ws1EL+FCTqQw9qKVgEcbjK/DZipxXANnpXRjpsg5WNSEVb7I0eYFxWTH+zHP8FEOFCKLPgF2GJPW5baUgADukf1hELJwP/SOlKCHiW2skeeXcnlwiaeMDAO2EeTgyC/4OpUVNuZYYtXkP999jQIcKNaLiW4A0xT7yw37JV1HD2rEIROMqdvH094B98Lhkq0DGM/x8D4GZUISEBvjYAvUkgjrM5rL6vvBRKCP8WwGxa7UVs+qDzvUYHCggOCV8vkzqGl0uK21AFu4kjMTZ+iJ55Prpw+XDDs4Kk9xRz7+95k6efucvbuwRZs1NhSY3oy/cUWXv0VkL13WAKOI5f/c= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c302da1-6f9c-4795-7cff-08dc720bf66e X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 22:44:48.4993 (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: mSh/MThx8zYmImo+z/Lmac0rk+9/m6XKP0DbW0sejOVJTthN8tKah30i6ATtHoYJm0iREObyLWV7mWrW//0DDD18xLbyyXSGWeXXfyll3lA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5184 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-11_06,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405110171 X-Proofpoint-ORIG-GUID: _mXa5YjPetcukH-d-cLK16xvjrp0i9mA X-Proofpoint-GUID: _mXa5YjPetcukH-d-cLK16xvjrp0i9mA When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges file should be installed in the module install location. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v1: - Renamed CONFIG_BUILTIN_RANGES to CONFIG_BUILTIN_MODULE_RANGES --- scripts/Makefile.modinst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index b45586aa1de49..e185dacae892a 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_MODULE_RANGES) += $(MODLIB)/modules.builtin.ranges + +$(MODLIB)/modules.builtin.ranges: modules.builtin.ranges FORCE + $(call cmd,install) + endif modules := $(call read-file, $(MODORDER))