Search notes:

scripts/mksysmap

scripts/mksysmap creates the System.map file based on the vmlinux file.
mksysmap is called from scripts/link-vmlinux.sh (function mksysmap), for example to create System.map.
sh ./scripts/mksysmap vmlinux System.map .tmp_vmlinux.kallsyms2.o

Usage

scripts/mksysmap vmlinux System.map [exclude]
The optional 3rd parameter ([exclude]) refers to an object file whose symbols 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.

See also

The directory scripts/

Index