Unverified Commit 3328d39a authored by Alexey Gladkov's avatar Alexey Gladkov Committed by Nathan Chancellor
Browse files

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: default avatarAlexey Gladkov <legion@kernel.org>
Reviewed-by: default avatarNicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/0e63a9c7741fe8217e4fd7c60afcf057ffa2ef5a.1758182101.git.legion@kernel.org


Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
parent 5ab23c79
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -53,11 +53,6 @@ endif
# vmlinux.unstripped
# ---------------------------------------------------------------------------

ifdef CONFIG_MODULES
targets += .vmlinux.export.o
vmlinux.unstripped: .vmlinux.export.o
endif

ifdef CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX
vmlinux.unstripped: arch/$(SRCARCH)/tools/vmlinux.arch.o

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

targets += vmlinux.unstripped
vmlinux.unstripped: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
targets += vmlinux.unstripped .vmlinux.export.o
vmlinux.unstripped: scripts/link-vmlinux.sh vmlinux.o .vmlinux.export.o $(KBUILD_LDS) FORCE
	+$(call if_changed_dep,link_vmlinux)
ifdef CONFIG_DEBUG_INFO_BTF
vmlinux.unstripped: $(RESOLVE_BTFIDS)
+1 −4
Original line number Diff line number Diff line
@@ -73,10 +73,7 @@ vmlinux_link()
		objs="${objs} .builtin-dtbs.o"
	fi

	if is_enabled CONFIG_MODULES; then
	objs="${objs} .vmlinux.export.o"
	fi

	objs="${objs} init/version-timestamp.o"

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