Skip to content

Commit 3328d39

Browse files
legionusnathanchance
authored andcommitted
kbuild: vmlinux.unstripped should always depend on .vmlinux.export.o
Since .vmlinux.export.c is used to add generated by modpost modaliases for builtin modules the .vmlinux.export.o is no longer optional and should always be created. The generation of this file is not dependent on CONFIG_MODULES. Signed-off-by: Alexey Gladkov <legion@kernel.org> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://patch.msgid.link/0e63a9c7741fe8217e4fd7c60afcf057ffa2ef5a.1758182101.git.legion@kernel.org Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 5ab23c7 commit 3328d39

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

scripts/Makefile.vmlinux

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ endif
5353
# vmlinux.unstripped
5454
# ---------------------------------------------------------------------------
5555

56-
ifdef CONFIG_MODULES
57-
targets += .vmlinux.export.o
58-
vmlinux.unstripped: .vmlinux.export.o
59-
endif
60-
6156
ifdef CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX
6257
vmlinux.unstripped: arch/$(SRCARCH)/tools/vmlinux.arch.o
6358

@@ -72,8 +67,8 @@ cmd_link_vmlinux = \
7267
$< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)" "$@"; \
7368
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
7469

75-
targets += vmlinux.unstripped
76-
vmlinux.unstripped: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
70+
targets += vmlinux.unstripped .vmlinux.export.o
71+
vmlinux.unstripped: scripts/link-vmlinux.sh vmlinux.o .vmlinux.export.o $(KBUILD_LDS) FORCE
7772
+$(call if_changed_dep,link_vmlinux)
7873
ifdef CONFIG_DEBUG_INFO_BTF
7974
vmlinux.unstripped: $(RESOLVE_BTFIDS)

scripts/link-vmlinux.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ vmlinux_link()
7373
objs="${objs} .builtin-dtbs.o"
7474
fi
7575

76-
if is_enabled CONFIG_MODULES; then
77-
objs="${objs} .vmlinux.export.o"
78-
fi
79-
76+
objs="${objs} .vmlinux.export.o"
8077
objs="${objs} init/version-timestamp.o"
8178

8279
if [ "${SRCARCH}" = "um" ]; then

0 commit comments

Comments
 (0)