Skip to content

Commit 48a0f72

Browse files
committed
modpost: show warning if any of symbol dump files is missing
If modpost fails to load a symbol dump file, it cannot check unresolved symbols, hence module dependency will not be added. Nor CRCs can be added. Currently, external module builds check only $(objtree)/Module.symvers, but it should check files specified by KBUILD_EXTRA_SYMBOLS as well. Move the warning message from the top Makefile to scripts/Makefile.modpost and print the warning if any dump file is missing. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 7e8a323 commit 48a0f72

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,17 +1649,9 @@ else # KBUILD_EXTMOD
16491649
# We are always building modules
16501650
KBUILD_MODULES := 1
16511651

1652-
PHONY += $(objtree)/Module.symvers
1653-
$(objtree)/Module.symvers:
1654-
@test -e $(objtree)/Module.symvers || ( \
1655-
echo; \
1656-
echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \
1657-
echo " is missing; modules will have no dependencies and modversions."; \
1658-
echo )
1659-
16601652
build-dirs := $(KBUILD_EXTMOD)
16611653
PHONY += modules
1662-
modules: descend $(objtree)/Module.symvers
1654+
modules: descend
16631655
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
16641656

16651657
PHONY += modules_install

scripts/Makefile.modpost

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
9898
MODPOST += -n
9999
endif
100100

101+
# Clear VPATH to not search for *.symvers in $(srctree). Check only $(objtree).
102+
VPATH :=
101103
$(input-symdump):
102-
@:
104+
@echo >&2 'WARNING: Symbol version dump "$@" is missing.'
105+
@echo >&2 ' Modules may not have dependencies or modversions.'
103106

104107
# Read out modules.order to pass in modpost.
105108
# Otherwise, allmodconfig would fail with "Argument list too long".

0 commit comments

Comments
 (0)