aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-01-21 15:31:44 -0500
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 17:21:18 -0500
commit91341d4b2c196c689acf90e9e96f28f8d5c6665f (patch)
treeb4676097b6a3fe4f5e9d420ba9d9956bb883e506 /scripts
parenteb8f689046b857874e964463619f09df06d59fad (diff)
kbuild: introduce new option to enhance section mismatch analysis
Setting the option DEBUG_SECTION_MISMATCH will report additional section mismatch'es but this should in the end makes it possible to get rid of all of them. See help text in lib/Kconfig.debug for details. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index db38ef465a63..67fb4530a6ff 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -103,6 +103,10 @@ ifneq ($(KBUILD_CHECKSRC),0)
103 endif 103 endif
104endif 104endif
105 105
106# Do section mismatch analysis for each module/built-in.o
107ifdef CONFIG_DEBUG_SECTION_MISMATCH
108 cmd_secanalysis = ; scripts/mod/modpost $@
109endif
106 110
107# Compile C sources (.c) 111# Compile C sources (.c)
108# --------------------------------------------------------------------------- 112# ---------------------------------------------------------------------------
@@ -268,7 +272,8 @@ ifdef builtin-target
268quiet_cmd_link_o_target = LD $@ 272quiet_cmd_link_o_target = LD $@
269# If the list of objects to link is empty, just create an empty built-in.o 273# If the list of objects to link is empty, just create an empty built-in.o
270cmd_link_o_target = $(if $(strip $(obj-y)),\ 274cmd_link_o_target = $(if $(strip $(obj-y)),\
271 $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\ 275 $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \
276 $(cmd_secanalysis),\
272 rm -f $@; $(AR) rcs $@) 277 rm -f $@; $(AR) rcs $@)
273 278
274$(builtin-target): $(obj-y) FORCE 279$(builtin-target): $(obj-y) FORCE
@@ -316,7 +321,7 @@ $($(subst $(obj)/,,$(@:.o=-objs))) \
316$($(subst $(obj)/,,$(@:.o=-y)))), $^) 321$($(subst $(obj)/,,$(@:.o=-y)))), $^)
317 322
318quiet_cmd_link_multi-y = LD $@ 323quiet_cmd_link_multi-y = LD $@
319cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) 324cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)
320 325
321quiet_cmd_link_multi-m = LD [M] $@ 326quiet_cmd_link_multi-m = LD [M] $@
322cmd_link_multi-m = $(cmd_link_multi-y) 327cmd_link_multi-m = $(cmd_link_multi-y)