The built-in only code is not required to have MODULE_IMPORT_NS() to use symbols. So, the namespace is not checked for vmlinux(.o). Do not pass the meaningless -N option to the first pass of modpost.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -53,7 +53,6 @@ MODPOST = scripts/mod/modpost \ · 52 unmodified lines | |||
| 53 | $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ | 53 | $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ |
| 54 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 54 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
| 55 | $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ | 55 | $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ |
| 56 | $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ | ||
| 57 | $(if $(KBUILD_MODPOST_WARN),-w) | 56 | $(if $(KBUILD_MODPOST_WARN),-w) |
| 58 | 57 | ||
| 59 | ifdef MODPOST_VMLINUX | 58 | ifdef MODPOST_VMLINUX |
| @@ -82,6 +81,10 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ · 22 unmodified lines | |||
| 82 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) | 81 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) |
| 83 | endif | 82 | endif |
| 84 | 83 | ||
| 84 | # modpost options for modules (both in-kernel and external) | ||
| 85 | MODPOST += \ | ||
| 86 | $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) | ||
| 87 | |||
| 85 | # 'make -i -k' ignores compile errors, and builds as many modules as possible. | 88 | # 'make -i -k' ignores compile errors, and builds as many modules as possible. |
| 86 | ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),) | 89 | ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),) |
| 87 | MODPOST += -n | 90 | MODPOST += -n |