path: root/scripts/
diff options
authorMasahiro Yamada <>2020-06-01 14:57:11 +0900
committerMasahiro Yamada <>2020-06-06 23:38:12 +0900
commit269a535ca931b754a40dda3ab60514e68773c759 (patch)
treec611f2b2d48fd1f79ba0b58ea2295af297222db1 /scripts/
parentf1005b30ade716eb9286613aeb1d33b5c7852a91 (diff)
modpost: generate vmlinux.symvers and reuse it for the second modpost
The full build runs modpost twice, first for vmlinux.o and second for modules. The first pass dumps all the vmlinux symbols into Module.symvers, but the second pass parses vmlinux again instead of reusing the dump file, presumably because it needs to avoid accumulating stale symbols. Loading symbol info from a dump file is faster than parsing an ELF object. Besides, modpost deals with various issues to parse vmlinux in the second pass. A solution is to make the first pass dumps symbols into a separate file, vmlinux.symvers. The second pass reads it, and parses module .o files. The merged symbol information is dumped into Module.symvers in the same way as before. This makes further modpost cleanups possible. Also, it fixes the problem of 'make vmlinux', which previously overwrote Module.symvers, throwing away module symbols. I slightly touched scripts/ so that vmlinux is re-linked when you cross this commit. Otherwise, vmlinux.symvers would not be generated. Signed-off-by: Masahiro Yamada <>
Diffstat (limited to 'scripts/')
1 files changed, 0 insertions, 2 deletions
diff --git a/scripts/ b/scripts/
index d09ab4afbda4..d5af6be50b50 100755
--- a/scripts/
+++ b/scripts/
@@ -218,8 +218,6 @@ on_signals()
trap on_signals HUP INT QUIT TERM
# Use "make V=1" to debug this script
case "${KBUILD_VERBOSE}" in