aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8533f258c0e4..0f84c742ed0e 100644
--- a/Makefile
+++ b/Makefile
@@ -798,7 +798,7 @@ define rule_vmlinux-modpost
798endef 798endef
799 799
800# vmlinux image - including updated kernel symbols 800# vmlinux image - including updated kernel symbols
801vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) vmlinux.o FORCE 801vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o $(kallsyms.o) FORCE
802ifdef CONFIG_HEADERS_CHECK 802ifdef CONFIG_HEADERS_CHECK
803 $(Q)$(MAKE) -f $(srctree)/Makefile headers_check 803 $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
804endif 804endif
@@ -809,7 +809,9 @@ endif
809 $(call if_changed_rule,vmlinux__) 809 $(call if_changed_rule,vmlinux__)
810 $(Q)rm -f .old_version 810 $(Q)rm -f .old_version
811 811
812vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE 812# build vmlinux.o first to catch section mismatch errors early
813$(kallsyms.o): vmlinux.o
814vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE
813 $(call if_changed_rule,vmlinux-modpost) 815 $(call if_changed_rule,vmlinux-modpost)
814 816
815# The actual objects are generated when descending, 817# The actual objects are generated when descending,