diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-09-24 21:19:13 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-09-29 00:07:58 +0300 |
commit | f73edc8951b2de515b5ecc8a357ccd47dd41077e (patch) | |
tree | d47510e68b59ee420a244941b11be9a189c7e955 /scripts/link-vmlinux.sh | |
parent | 9c5a0ac3c36917c4258f734bda98be02ca36b992 (diff) | |
download | linux-f73edc8951b2de515b5ecc8a357ccd47dd41077e.tar.xz |
kbuild: unify two modpost invocations
Currently, modpost is executed twice; first for vmlinux, second
for modules.
This commit merges them.
Current build flow
==================
1) build obj-y and obj-m objects
2) link vmlinux.o
3) modpost for vmlinux
4) link vmlinux
5) modpost for modules
6) link modules (*.ko)
The build steps 1) through 6) are serialized, that is, modules are
built after vmlinux. You do not get benefits of parallel builds when
scripts/link-vmlinux.sh is being run.
New build flow
==============
1) build obj-y and obj-m objects
2) link vmlinux.o
3) modpost for vmlinux and modules
4a) link vmlinux
4b) link modules (*.ko)
In the new build flow, modpost is invoked just once.
vmlinux and modules are built in parallel. One exception is
CONFIG_DEBUG_INFO_BTF_MODULES=y, where modules depend on vmlinux.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-x | scripts/link-vmlinux.sh | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 07486f90d5e2..6a197d8a88ac 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -214,9 +214,6 @@ if [ "$1" = "clean" ]; then exit 0 fi -# modpost vmlinux.o to check for section mismatches -${MAKE} -f "${srctree}/scripts/Makefile.modpost" MODPOST_VMLINUX=1 - info MODINFO modules.builtin.modinfo ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo info GEN modules.builtin |