From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C22FC433F5 for ; Sun, 1 May 2022 08:44:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343817AbiEAIsH (ORCPT ); Sun, 1 May 2022 04:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344177AbiEAIqQ (ORCPT ); Sun, 1 May 2022 04:46:16 -0400 Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D91E4CD59; Sun, 1 May 2022 01:42:45 -0700 (PDT) Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-12.nifty.com with ESMTP id 2418f2S3008518; Sun, 1 May 2022 17:41:12 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 2418f2S3008518 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1651394473; bh=48YeH5yLVjVlCyq9pr+WDCNXaWRxxkvMIZASlpjblKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WVwc3OaY4iXLOvVOKd74uPe60KP3vepPod/hp9ZUxHhvhhLGU7XzC+22e7B8iUDiF 6HGLtpzILSQz4yNSY0BcOM9scMmEIoI28Ktt47pHhhzxXUwhkswBbe5UKyZC9xbblI Pj1YkvxDUJ76DRRTfnnijr/luDxx7om3s+5v1pIeFhi3sX5S568ieT+Ssz7CcaamT8 z6oj7Fe89lbMyboQTArFwkaqK5fuHwQBvQLGjlLXbBp8e4OR/QoNxB7SIwS1/9dUwu 6FMpCAG1wpfn9wiR1XrCgb6sDmOacA4DC+ezejhMoRcb5ZxrWvpJIrdqMrfLHhsRWs WO87XtFCL6+EA== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nicolas Schier , Michal Marek , Nick Desaulniers Subject: [PATCH v2 16/26] kbuild: generate a list of objects in vmlinux Date: Sun, 1 May 2022 17:40:22 +0900 Message-Id: <20220501084032.1025918-17-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220501084032.1025918-1-masahiroy@kernel.org> References: <20220501084032.1025918-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A *.mod file lists the member objects of a module, but vmlinux does not have such a file to list out all the member objects. Generate this list to allow modpost to know all the member objects. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- Changes in v2: - Move '> .vmlinux.objs' to the outside of the loop (Nicolas) - Clean up .vmlinux.objs explicitly scripts/link-vmlinux.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 20f44504a644..eceb3ee7ec06 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -311,6 +311,7 @@ cleanup() rm -f vmlinux.map rm -f vmlinux.o rm -f .vmlinux.d + rm -f .vmlinux.objs } # Use "make V=1" to debug this script @@ -342,6 +343,16 @@ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 modpost_link vmlinux.o objtool_link vmlinux.o +# Generate the list of objects in vmlinux +for f in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do + case ${f} in + *.a) + ${AR} t ${f} ;; + *) + echo ${f} ;; + esac +done > .vmlinux.objs + # modpost vmlinux.o to check for section mismatches ${MAKE} -f "${srctree}/scripts/Makefile.modpost" MODPOST_VMLINUX=1 -- 2.32.0