@@ -52,7 +52,7 @@ obj-y += rcu/
obj-y += livepatch/
obj-y += dma/
obj-y += entry/
-obj-y += module/
+obj-$(CONFIG_MODULES) += module/
obj-$(CONFIG_KCMP) += kcmp.o
obj-$(CONFIG_FREEZER) += freezer.o
@@ -66,6 +66,7 @@ ifneq ($(CONFIG_SMP),y)
obj-y += up.o
endif
obj-$(CONFIG_UID16) += uid16.o
+obj-$(CONFIG_MODULE_SIG_FORMAT) += module_signature.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_CRASH_CORE) += crash_core.o
@@ -7,12 +7,10 @@
# and produce insane amounts of uninteresting coverage.
KCOV_INSTRUMENT_main.o := n
-obj-$(CONFIG_MODULES) += main.o
+obj-y += main.o
obj-$(CONFIG_MODULE_DECOMPRESS) += decompress.o
obj-$(CONFIG_MODULE_SIG) += signing.o
-obj-$(CONFIG_MODULE_SIG_FORMAT) += signature.o
obj-$(CONFIG_LIVEPATCH) += livepatch.o
-ifdef CONFIG_MODULES
obj-$(CONFIG_MODULES_TREE_LOOKUP) += tree_lookup.o
obj-$(CONFIG_STRICT_MODULE_RWX) += strict_rwx.o
obj-$(CONFIG_DEBUG_KMEMLEAK) += debug_kmemleak.o
@@ -20,4 +18,3 @@ obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_PROC_FS) += procfs.o
obj-$(CONFIG_SYSFS) += sysfs.o
obj-$(CONFIG_MODVERSIONS) += version.o
-endif
similarity index 100%
rename from kernel/module/signature.c
rename to kernel/module_signature.c
Move signature.c back into kernel/ because it is used by more than modules. Then build kernel/module/ only when CONFIG_MODULES is selected. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- Ideally this patch should be squashed in Aaron's series patch 1 --- kernel/Makefile | 3 ++- kernel/module/Makefile | 5 +---- kernel/{module/signature.c => module_signature.c} | 0 3 files changed, 3 insertions(+), 5 deletions(-) rename kernel/{module/signature.c => module_signature.c} (100%)