diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-03-08 12:52:39 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-04-17 04:03:56 +0200 |
commit | ca09bf48f99bdc08e17da11aeae56b7ea132b7c8 (patch) | |
tree | 7452ffbe8f95244193274ee10cca0d3b6b18ed7e /scripts/mksysmap | |
parent | scripts/mksysmap: use sed with in-line comments (diff) | |
download | linux-ca09bf48f99bdc08e17da11aeae56b7ea132b7c8.tar.xz linux-ca09bf48f99bdc08e17da11aeae56b7ea132b7c8.zip |
scripts/kallsyms: exclude symbols generated by itself dynamically
Drop the symbols generated by scripts/kallsyms itself automatically
instead of maintaining the symbol list manually.
Pass the kallsyms object from the previous kallsyms step (if it exists)
as the third parameter of scripts/mksysmap, which will weed out the
generated symbols from the input to the next kallsyms step.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mksysmap')
-rwxr-xr-x | scripts/mksysmap | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/mksysmap b/scripts/mksysmap index 41ad4605aeef..ff91ec8ecca7 100755 --- a/scripts/mksysmap +++ b/scripts/mksysmap @@ -4,7 +4,7 @@ # tools to retrieve the actual addresses of symbols in the kernel. # # Usage -# mksysmap vmlinux System.map +# mksysmap vmlinux System.map [exclude] ##### @@ -52,4 +52,13 @@ ${NM} -n ${1} | sed >${2} -e " # for LoongArch? / L0$/d + +# --------------------------------------------------------------------------- +# Ignored kallsyms symbols +# +# If the 3rd parameter exists, symbols from it will be omitted from the output. +# This makes kallsyms have the identical symbol lists in the step 1 and 2. +# Without this, the step2 would get new symbols generated by scripts/kallsyms.c +# when CONFIG_KALLSYMS_ALL is enabled. That might require one more pass. +$(if [ $# -ge 3 ]; then ${NM} ${3} | sed -n '/ U /!s:.* \([^ ]*\)$:/ \1$/d:p'; fi) " |