summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-01-21 22:57:09 +0100
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 23:21:18 +0100
commit310f8243a602e9ae950e81b17cbd18a4246674f9 (patch)
treeeca73a95b8ef4143dfada6b5f8290d4feee6bc30 /Makefile
parent91341d4b2c196c689acf90e9e96f28f8d5c6665f (diff)
downloadop-kernel-dev-310f8243a602e9ae950e81b17cbd18a4246674f9.zip
op-kernel-dev-310f8243a602e9ae950e81b17cbd18a4246674f9.tar.gz
kbuild: link vmlinux.o before kallsyms passes
link vmlinux.o so we may report section mismatch bugs before we start with the real link - that may error out. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8533f25..0f84c74 100644
--- a/Makefile
+++ b/Makefile
@@ -798,7 +798,7 @@ define rule_vmlinux-modpost
endef
# vmlinux image - including updated kernel symbols
-vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) vmlinux.o FORCE
+vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o $(kallsyms.o) FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
@@ -809,7 +809,9 @@ endif
$(call if_changed_rule,vmlinux__)
$(Q)rm -f .old_version
-vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
+# build vmlinux.o first to catch section mismatch errors early
+$(kallsyms.o): vmlinux.o
+vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE
$(call if_changed_rule,vmlinux-modpost)
# The actual objects are generated when descending,
OpenPOWER on IntegriCloud