Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7 -14
+6 -13
scripts/mksysmap
··· 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 + # 3 7 # System.map is used by module-init tools and some debugging 4 8 # tools to retrieve the actual addresses of symbols in the kernel. 5 9 # 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 - 14 10 # readprofile starts reading symbols when _stext is found, and 15 11 # continue until it finds a symbol which is not either of 'T', 't', 16 12 # 'W' or 'w'. 17 13 # 18 - 19 - ${NM} -n ${1} | sed >${2} -e " 20 14 # --------------------------------------------------------------------------- 21 15 # Ignored symbol types 22 16 # ··· 86 92 # ppc stub 87 93 /\.long_branch\./d 88 94 /\.plt_branch\./d 89 - "