Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2423012lqo; Mon, 20 May 2024 05:42:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRqTvtoimAFJME9822gOl5A2LlrOiHaveFFsLY1cWyCtC443B9AKIiiFs2Co7+6bPBGqnmZjINsYyADiEZdblP+PA/xubwL4TI1CnFqg== X-Google-Smtp-Source: AGHT+IFwE0VqIM0bLuCjmpEX1vW2FJmGZX/jO/jXxpgKUeT9mqgy2l4YgtTo96uhMEwCH9dumcds X-Received: by 2002:a17:906:f10f:b0:a59:ae57:1658 with SMTP id a640c23a62f3a-a5a2d55aebdmr1858304166b.30.1716208972452; Mon, 20 May 2024 05:42:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716208972; cv=pass; d=google.com; s=arc-20160816; b=bFhpL68xNi+5S2VIDPMxPkdILF2JIlaHDG49I7SBp4XJ6dwpUAYHGlKjY9NLYV1kBk v3KGtxGRUfdqN6B/u4rRrP6Yk2Er65EUyQh+dTGzLP9XhiQf2kWbabM1akjnuRnA4iO/ iHR6Ct4pEvZIcvCPr5UvVSNJ1P5OcHTsXssNBG4I73aWH+YHvhFt9Vv7eyTGquoEtTLQ zmYTm1AechcqLWKUHSNMlDzUIPb4kMyZ0JtQkTJtAekevrnO8M7Fi4PdiJbTkzoiifFa J1g6z1W+jJ+3aExA1wuCCe8Ag5TMopoq5kCkEWD6OOlvwtTfl1Jbl98sz3HpC4NAheBX qdaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TG+Ul36eKfwaJebVcwLMoL8/QsJ8ou8YSm0UC7iXBH8=; fh=Ab4Xz7cR8ulQ0VYifdcQJZ7/QMCFmxSrbk4VpYfZvsU=; b=bDCbsjRkfag+An//XDdBLIRbLKJgwwWm9w5lEWJOSpE0paGkqDzaOI9dVIS3AdHTtz 6YAHNXX+/KJoOxitgZ+JLrczg5WnBgHBtedxcyvx9wx6GkTATDrbQp8PkXh5OB18omjm GvHrM0s6ZXgpEe3oZWGPD+KO1wCq8KLcN4a0yPA2r0HMrkY01Lo5RCtbM3utzaELDAnK An7/xMObTgj8pqGAmzL24KFMxAVAarYAxcJRQ/5m28PejH/X6FM5YVsICtokvBlU66vK +UGL6nR04HM+FlPjbzLZPE2cZljIjGeg1FqCRbq1UaRz7g3E93c9gMhlBPuZUcpeB2P+ ZE4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJyYELBp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2c14bsi1348562866b.953.2024.05.20.05.42.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 05:42:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJyYELBp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 33AE61F219E4 for ; Mon, 20 May 2024 12:42:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC827605BB; Mon, 20 May 2024 12:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lJyYELBp" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DF4725FBA0; Mon, 20 May 2024 12:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716208948; cv=none; b=lo1RLE+7Jm1NY3Fi4qxg2MJsOiFW6scCkmVB/NEOQ/qJVF6Hjx5BRol9SVguv8f7jspLvZqV2U6+zF65wl98EkhdVeHC85DHfAv68iffK6WZLDnL2FfVDHFiINYqLD5dXvKPervqDyLp0EzykMZi1wgcGsy+Z2NWPdeQB2GI2RQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716208948; c=relaxed/simple; bh=xxfBrLnsF1A2xg6Jdz/kmz2DmtquNNmEmxzRupok00A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j3dE+m9GwEyOu04OV37lFu3J7jursC8mO4v1Z6bV4EPQ7OIx2MPMyWw+eTjnhiVE1/VqWhfqlTF0vXkifEdkP20rfjvrIfAOXeK5e62Sk1KpJCnCoeFzCoZRxX0SDQvd+xhNsziPufyojBjwXp4Z0BIlrbyjc3W9nzRFbtc1wi8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lJyYELBp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E37EFC4AF09; Mon, 20 May 2024 12:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716208947; bh=xxfBrLnsF1A2xg6Jdz/kmz2DmtquNNmEmxzRupok00A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lJyYELBp2Z83mPg8efMr9jQdaEsibHaSry6bprWwqtyrcFpHcH1fB8SZ+O4syblea bcjgR51BbvSlTubXRC+pjHSseAkC1OdVNGQe5rSdh3dumXXvn8kuRrLoc9Gj05fXVO +zCG1HYUe+b3B8M7a57pniEfIdeBTkcDN1XPZ4UqcYXLyYNJHFAYYtgdyYnlwPh7O7 RXw0btRjNTewyVJglU8I+/pRPa1D56Q8l9sBU+AbHh16HcHJv0pIhrZmiQAtxx8VSz X73yOZmzYkV8pE0U/BoDFaRtrIaO9NKu56jxl2Jlz0PaINxdRg/9nNdC5TCD7GeqTO 8bxH6nPVzJ2vw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nicolas Schier Subject: [PATCH 2/4] kbuild: change scripts/mksysmap into sed script Date: Mon, 20 May 2024 21:42:10 +0900 Message-Id: <20240520124212.2351033-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240520124212.2351033-1-masahiroy@kernel.org> References: <20240520124212.2351033-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The previous commit removed the subshell execution from scripts/mksysmap, which is now simple enough to become a sed script. Signed-off-by: Masahiro Yamada --- scripts/link-vmlinux.sh | 2 +- scripts/mksysmap | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index b0d39a927fbc..c22a213ea6a9 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -193,7 +193,7 @@ kallsyms_step() mksysmap() { info NM ${2} - ${CONFIG_SHELL} "${srctree}/scripts/mksysmap" ${1} ${2} + ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}" } sorttable() diff --git a/scripts/mksysmap b/scripts/mksysmap index e46bafe333bd..c12723a04655 100755 --- a/scripts/mksysmap +++ b/scripts/mksysmap @@ -1,22 +1,16 @@ -#!/bin/sh -x -# Based on the vmlinux file create the System.map file +#!/bin/sed -f +# SPDX-License-Identifier: GPL-2.0-only +# +# sed script to filter out symbols that are not needed for System.map, +# or not suitable for kallsyms. The input should be 'nm -n '. +# # System.map is used by module-init tools and some debugging # tools to retrieve the actual addresses of symbols in the kernel. # -# Usage -# mksysmap vmlinux System.map - - -##### -# Generate System.map (actual filename passed as second argument) -# The following refers to the symbol type as per nm(1). - # readprofile starts reading symbols when _stext is found, and # continue until it finds a symbol which is not either of 'T', 't', # 'W' or 'w'. # - -${NM} -n ${1} | sed >${2} -e " # --------------------------------------------------------------------------- # Ignored symbol types # @@ -92,4 +86,3 @@ ${NM} -n ${1} | sed >${2} -e " # ppc stub /\.long_branch\./d /\.plt_branch\./d -" -- 2.40.1