diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-02-03 02:37:42 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-02-03 02:37:42 -0600 |
| commit | 46f08e8a4c76f41ad95309631c858d17a3b73c49 (patch) | |
| tree | c2f753117824fcb1ebf7923f93303e253d999889 | |
| parent | d5ea3bb59fe2d4a5216e1daa1e5631f47825665e (diff) | |
kbuild: Generate module versions in the normal object directories
We generated the intermediate files that contain checksums for
unresolved symbols in .tmp_versions, which had the disadvantage
that is obscured what's going on during the build. Just
generate them as .ver.[co] right next to the actual objects in the
object tree.
| -rw-r--r-- | scripts/Makefile.modver | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/Makefile.modver b/scripts/Makefile.modver index 372d6aff5a32..95c9a772eda4 100644 --- a/scripts/Makefile.modver +++ b/scripts/Makefile.modver @@ -14,25 +14,30 @@ modules := $(patsubst ./%,%,$(shell cd $(MODVERDIR); find . -name \*.ko)) __modversions: $(modules) @: +# The final module link + quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@ \ $(filter-out FORCE,$^) init/vermagic.o: ; -$(modules): %.ko :%.o $(MODVERDIR)/%.o init/vermagic.o FORCE +$(modules): %.ko :%.o %.ver.o init/vermagic.o FORCE $(call if_changed,ld_ko_o) targets += $(modules) +# Compile version info for unresolved symbols quiet_cmd_cc_o_c = CC $@ cmd_cc_o_c = $(CC) $(CFLAGS) -c -o $@ $< -$(addprefix $(MODVERDIR)/,$(modules:.ko=.o)): %.o: %.c FORCE +$(modules:.ko=.ver.o): %.ver.o: %.ver.c FORCE $(call if_changed,cc_o_c) -targets += $(addprefix $(MODVERDIR)/,$(modules:.ko=.o)) +targets += $(modules:.ko=.ver.o) + +# Generate C source with version info for unresolved symbols define rule_mkver_o_c echo ' MKVER $@'; \ @@ -48,11 +53,12 @@ define rule_mkver_o_c ) > $@ endef -$(addprefix $(MODVERDIR)/,$(modules:.ko=.c)): \ -$(MODVERDIR)/%.c: %.o .tmp_all-versions FORCE +$(modules:.ko=.ver.c): %.ver.c: %.o .tmp_all-versions FORCE $(call if_changed_rule,mkver_o_c) -targets += $(addprefix $(MODVERDIR)/,$(modules:.ko=.o.c)) +targets += $(modules:.ko=.ver.c)) + +# Extract all checksums for all exported symbols export-objs := $(shell for m in vmlinux $(modules:.ko=.o); do objdump -h $$m | grep -q __ksymtab && echo $$m; done) |
