|
@@ -42,6 +42,13 @@ _modpost: __modpost
|
|
|
|
|
|
include include/config/auto.conf
|
|
|
include scripts/Kbuild.include
|
|
|
+
|
|
|
+ifneq ($(KBUILD_EXTMOD),)
|
|
|
+# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
|
|
|
+include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
|
|
|
+ $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
|
|
|
+endif
|
|
|
+
|
|
|
include scripts/Makefile.lib
|
|
|
|
|
|
kernelsymfile := $(objtree)/Module.symvers
|
|
@@ -69,6 +76,7 @@ modpost = scripts/mod/modpost \
|
|
|
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
|
|
|
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
|
|
|
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
|
|
|
+ $(if $(iKBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \
|
|
|
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
|
|
|
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
|
|
|
$(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
|