diff options
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r-- | scripts/Makefile.modpost | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 65e707e1ffc3..cfc004e04417 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -13,6 +13,7 @@ | |||
13 | # 2) modpost is then used to | 13 | # 2) modpost is then used to |
14 | # 3) create one <module>.mod.c file pr. module | 14 | # 3) create one <module>.mod.c file pr. module |
15 | # 4) create one Module.symvers file with CRC for all exported symbols | 15 | # 4) create one Module.symvers file with CRC for all exported symbols |
16 | # 4a) [CONFIG_MARKERS] create one Module.markers file listing defined markers | ||
16 | # 5) compile all <module>.mod.c files | 17 | # 5) compile all <module>.mod.c files |
17 | # 6) final link of the module to a <module.ko> file | 18 | # 6) final link of the module to a <module.ko> file |
18 | 19 | ||
@@ -45,6 +46,10 @@ include scripts/Makefile.lib | |||
45 | 46 | ||
46 | kernelsymfile := $(objtree)/Module.symvers | 47 | kernelsymfile := $(objtree)/Module.symvers |
47 | modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers | 48 | modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers |
49 | kernelmarkersfile := $(objtree)/Module.markers | ||
50 | modulemarkersfile := $(firstword $(KBUILD_EXTMOD))/Module.markers | ||
51 | |||
52 | markersfile = $(if $(KBUILD_EXTMOD),$(modulemarkersfile),$(kernelmarkersfile)) | ||
48 | 53 | ||
49 | # Step 1), find all modules listed in $(MODVERDIR)/ | 54 | # Step 1), find all modules listed in $(MODVERDIR)/ |
50 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) | 55 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) |
@@ -63,6 +68,8 @@ modpost = scripts/mod/modpost \ | |||
63 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ | 68 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ |
64 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 69 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
65 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ | 70 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ |
71 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ | ||
72 | $(if $(CONFIG_MARKERS),-M $(markersfile)) \ | ||
66 | $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) | 73 | $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) |
67 | 74 | ||
68 | quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules | 75 | quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules |
@@ -82,6 +89,10 @@ vmlinux.o: FORCE | |||
82 | $(symverfile): __modpost ; | 89 | $(symverfile): __modpost ; |
83 | $(modules:.ko=.mod.c): __modpost ; | 90 | $(modules:.ko=.mod.c): __modpost ; |
84 | 91 | ||
92 | ifdef CONFIG_MARKERS | ||
93 | $(markersfile): __modpost ; | ||
94 | endif | ||
95 | |||
85 | 96 | ||
86 | # Step 5), compile all *.mod.c files | 97 | # Step 5), compile all *.mod.c files |
87 | 98 | ||