kbuild: reuse mksysmap output for kallsyms
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 26 Sep 2022 09:02:26 +0000 (18:02 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 2 Oct 2022 09:06:05 +0000 (18:06 +0900)
commit94ff2f63d6a31501ceb36ebc600240937cfff35f
treed5ba91809500d683c12a72a307dac9ca3197469c
parentc13461693ea21d787f82232ce3a5667da370d973
kbuild: reuse mksysmap output for kallsyms

scripts/mksysmap internally runs ${NM} (dropping some symbols).

When CONFIG_KALLSYMS=y, mksysmap creates .tmp_System.map, but it is
almost the same as the output from the ${NM} invocation in kallsyms().
It is true scripts/mksysmap drops some symbols, but scripts/kallsyms.c
ignores more anyway.

Keep the mksysmap output as *.syms, and reuse it for kallsyms and
'cmp -s'. It saves one ${NM} invocation.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/link-vmlinux.sh