History

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.

Masahiro Yamada committed 6 years ago

Commit 48a0f721 parent 7e8a3232 files · +5 −10Browse files

Unified · Split

2 files
  1. Makefile +1 −9
  2. scripts/Makefile.modpost +4 −1
Makefile+1−9
@@ -1649,17 +1649,9 @@ else # KBUILD_EXTMOD · 1648 unmodified lines
1649# We are always building modules1649# We are always building modules
1650KBUILD_MODULES := 11650KBUILD_MODULES := 1
1651 1651
1652PHONY += $(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
1660build-dirs := $(KBUILD_EXTMOD)1652build-dirs := $(KBUILD_EXTMOD)
1661PHONY += modules1653PHONY += modules
1662modules: descend $(objtree)/Module.symvers1654modules: descend
1663 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost1655 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
1664 1656
1665PHONY += modules_install1657PHONY += modules_install
scripts/Makefile.modpost+4−1
@@ -98,8 +98,11 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),) · 97 unmodified lines
98MODPOST += -n98MODPOST += -n
99endif99endif
100 100
101# Clear VPATH to not search for *.symvers in $(srctree). Check only $(objtree).
102VPATH :=
101$(input-symdump):103$(input-symdump):
102 @:104 @echo >&2 'WARNING: Symbol version dump "$@" is missing.'
105 @echo >&2 ' Modules may not have dependencies or modversions.'
103 106
104# Read out modules.order to pass in modpost.107# Read out modules.order to pass in modpost.
105# Otherwise, allmodconfig would fail with "Argument list too long".108# Otherwise, allmodconfig would fail with "Argument list too long".