Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit b18b047

Browse files
committed
kbuild: change scripts/mksysmap into sed script
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 <masahiroy@kernel.org>
1 parent 04b8cb0 commit b18b047

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

scripts/link-vmlinux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ kallsyms_step()
193193
mksysmap()
194194
{
195195
info NM ${2}
196-
${CONFIG_SHELL} "${srctree}/scripts/mksysmap" ${1} ${2}
196+
${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}"
197197
}
198198

199199
sorttable()

scripts/mksysmap

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
#!/bin/sh -x
2-
# Based on the vmlinux file create the System.map file
1+
#!/bin/sed -f
2+
# SPDX-License-Identifier: GPL-2.0-only
3+
#
4+
# sed script to filter out symbols that are not needed for System.map,
5+
# or not suitable for kallsyms. The input should be 'nm -n <file>'.
6+
#
37
# System.map is used by module-init tools and some debugging
48
# tools to retrieve the actual addresses of symbols in the kernel.
59
#
6-
# Usage
7-
# mksysmap vmlinux System.map
8-
9-
10-
#####
11-
# Generate System.map (actual filename passed as second argument)
12-
# The following refers to the symbol type as per nm(1).
13-
1410
# readprofile starts reading symbols when _stext is found, and
1511
# continue until it finds a symbol which is not either of 'T', 't',
1612
# 'W' or 'w'.
1713
#
18-
19-
${NM} -n ${1} | sed >${2} -e "
2014
# ---------------------------------------------------------------------------
2115
# Ignored symbol types
2216
#
@@ -92,4 +86,3 @@ ${NM} -n ${1} | sed >${2} -e "
9286
# ppc stub
9387
/\.long_branch\./d
9488
/\.plt_branch\./d
95-
"

0 commit comments

Comments
 (0)