The dependency $(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o ... exists because *.mod files previously contained undefined symbols, which are computed from *.o files when CONFIG_TRIM_UNUSED_KSYMS=y. Now that the undefined symbols are put into separate *.usyms files, there is no reason to make *.mod depend on *.o files.
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -85,7 +85,7 @@ ifdef need-builtin · 84 unmodified lines | |||
| 85 | targets-for-builtin += $(obj)/built-in.a | 85 | targets-for-builtin += $(obj)/built-in.a |
| 86 | endif | 86 | endif |
| 87 | 87 | ||
| 88 | targets-for-modules := $(foreach x, mod $(if $(CONFIG_TRIM_UNUSED_KSYMS), usyms), \ | 88 | targets-for-modules := $(foreach x, o mod $(if $(CONFIG_TRIM_UNUSED_KSYMS), usyms), \ |
| 89 | $(patsubst %.o, %.$x, $(filter %.o, $(obj-m)))) | 89 | $(patsubst %.o, %.$x, $(filter %.o, $(obj-m)))) |
| 90 | 90 | ||
| 91 | ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),) | 91 | ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),) |
| @@ -306,7 +306,7 @@ endif · 214 unmodified lines | |||
| 306 | cmd_mod = echo $(addprefix $(obj)/, $(call real-search, $*.o, .o, -objs -y -m)) | \ | 306 | cmd_mod = echo $(addprefix $(obj)/, $(call real-search, $*.o, .o, -objs -y -m)) | \ |
| 307 | $(AWK) -v RS='( |\n)' '!x[$$0]++' > $@ | 307 | $(AWK) -v RS='( |\n)' '!x[$$0]++' > $@ |
| 308 | 308 | ||
| 309 | $(obj)/%.mod: $(obj)/%$(mod-prelink-ext).o FORCE | 309 | $(obj)/%.mod: FORCE |
| 310 | $(call if_changed,mod) | 310 | $(call if_changed,mod) |
| 311 | 311 | ||
| 312 | # List module undefined symbols | 312 | # List module undefined symbols |
| @@ -469,7 +469,6 @@ $(multi-obj-m): FORCE · 156 unmodified lines | |||
| 469 | $(call if_changed,link_multi-m) | 469 | $(call if_changed,link_multi-m) |
| 470 | $(call multi_depend, $(multi-obj-m), .o, -objs -y -m) | 470 | $(call multi_depend, $(multi-obj-m), .o, -objs -y -m) |
| 471 | 471 | ||
| 472 | targets += $(multi-obj-m) | ||
| 473 | targets := $(filter-out $(PHONY), $(targets)) | 472 | targets := $(filter-out $(PHONY), $(targets)) |
| 474 | 473 | ||
| 475 | # Add intermediate targets: | 474 | # Add intermediate targets: |