Commit d5ea3bb5 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Rename CONFIG_MODVERSIONING -> CONFIG_MODVERSIONS

CONFIG_MODVERSIONING was a temporary name introduced to distinguish
between the old and new module version implementation. Since the
traces of the old implementation are now gone from the build system,
we rename the config option back in order to not confuse users more
than necessary in 2.6.
 
Also, remove some historic modversions cruft throughout the tree.
parent 6ef80ec1
...@@ -266,7 +266,7 @@ endif ...@@ -266,7 +266,7 @@ endif
# the built-in objects during the descend as well, in order to # the built-in objects during the descend as well, in order to
# make sure the checksums are uptodate before we record them. # make sure the checksums are uptodate before we record them.
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
ifeq ($(KBUILD_MODULES),1) ifeq ($(KBUILD_MODULES),1)
ifneq ($(KBUILD_BUILTIN),1) ifneq ($(KBUILD_BUILTIN),1)
KBUILD_BUILTIN := 1 KBUILD_BUILTIN := 1
...@@ -402,7 +402,7 @@ $(SUBDIRS): prepare ...@@ -402,7 +402,7 @@ $(SUBDIRS): prepare
.PHONY: prepare .PHONY: prepare
prepare: include/linux/version.h include/asm include/config/MARKER prepare: include/linux/version.h include/asm include/config/MARKER
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
ifdef KBUILD_MODULES ifdef KBUILD_MODULES
ifeq ($(origin SUBDIRS),file) ifeq ($(origin SUBDIRS),file)
$(Q)rm -rf $(MODVERDIR) $(Q)rm -rf $(MODVERDIR)
...@@ -511,7 +511,7 @@ ifdef CONFIG_MODULES ...@@ -511,7 +511,7 @@ ifdef CONFIG_MODULES
.PHONY: modules __modversions .PHONY: modules __modversions
modules: $(SUBDIRS) __modversions modules: $(SUBDIRS) __modversions
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
__modversions: vmlinux $(SUBDIRS) __modversions: vmlinux $(SUBDIRS)
@echo ' Recording module symbol versions.'; @echo ' Recording module symbol versions.';
......
...@@ -1196,11 +1196,7 @@ int zft_compressor_init(void) ...@@ -1196,11 +1196,7 @@ int zft_compressor_init(void)
printk( printk(
KERN_INFO "(c) 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n" KERN_INFO "(c) 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n"
KERN_INFO "Compressor for zftape (lzrw3 algorithm)\n" KERN_INFO "Compressor for zftape (lzrw3 algorithm)\n"
KERN_INFO "Compiled for kernel version %s" KERN_INFO "Compiled for kernel version %s\n", UTS_RELEASE);
#ifdef MODVERSIONS
" with versioned symbols"
#endif
"\n", UTS_RELEASE);
} }
#else /* !MODULE */ #else /* !MODULE */
/* print a short no-nonsense boot message */ /* print a short no-nonsense boot message */
......
...@@ -70,11 +70,7 @@ KERN_INFO "(c) 1993-1996 Bas Laarhoven (bas@vimec.nl)\n" ...@@ -70,11 +70,7 @@ KERN_INFO "(c) 1993-1996 Bas Laarhoven (bas@vimec.nl)\n"
KERN_INFO "(c) 1995-1996 Kai Harrekilde-Petersen (khp@dolphinics.no)\n" KERN_INFO "(c) 1995-1996 Kai Harrekilde-Petersen (khp@dolphinics.no)\n"
KERN_INFO "(c) 1996-1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n" KERN_INFO "(c) 1996-1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n"
KERN_INFO "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives\n" KERN_INFO "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives\n"
KERN_INFO "Compiled for Linux version %s" KERN_INFO "Compiled for Linux version %s\n", UTS_RELEASE);
#ifdef MODVERSIONS
" with versioned symbols"
#endif
"\n", UTS_RELEASE);
} }
#else /* !MODULE */ #else /* !MODULE */
/* print a short no-nonsense boot message */ /* print a short no-nonsense boot message */
......
...@@ -331,11 +331,7 @@ KERN_INFO ...@@ -331,11 +331,7 @@ KERN_INFO
KERN_INFO KERN_INFO
"and builtin compression (lzrw3 algorithm).\n" "and builtin compression (lzrw3 algorithm).\n"
KERN_INFO KERN_INFO
"Compiled for Linux version %s" "Compiled for Linux version %s\n", UTS_RELEASE);
#ifdef MODVERSIONS
" with versioned symbols"
#endif
"\n", UTS_RELEASE);
} }
#else /* !MODULE */ #else /* !MODULE */
/* print a short no-nonsense boot message */ /* print a short no-nonsense boot message */
......
...@@ -42,12 +42,6 @@ ...@@ -42,12 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
*/ */
/*
* This is the only file where module.h should
* embed module global version info.
*/
#define AHD_MODVERSION_FILE
#include "aic79xx_osm.h" #include "aic79xx_osm.h"
#include "aic79xx_inline.h" #include "aic79xx_inline.h"
#include <scsi/scsicam.h> #include <scsi/scsicam.h>
......
...@@ -50,9 +50,6 @@ ...@@ -50,9 +50,6 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/version.h> #include <linux/version.h>
#ifndef AHD_MODVERSION_FILE
#define __NO_VERSION__
#endif
#include <linux/module.h> #include <linux/module.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
......
...@@ -119,12 +119,6 @@ ...@@ -119,12 +119,6 @@
* *
*/ */
/*
* This is the only file where module.h should
* embed module global version info.
*/
#define AHC_MODVERSION_FILE
#include "aic7xxx_osm.h" #include "aic7xxx_osm.h"
#include "aic7xxx_inline.h" #include "aic7xxx_inline.h"
#include <scsi/scsicam.h> #include <scsi/scsicam.h>
......
...@@ -67,9 +67,6 @@ ...@@ -67,9 +67,6 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/version.h> #include <linux/version.h>
#ifndef AHC_MODVERSION_FILE
#define __NO_VERSION__
#endif
#include <linux/module.h> #include <linux/module.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -155,7 +155,7 @@ void *__symbol_get_gpl(const char *symbol); ...@@ -155,7 +155,7 @@ void *__symbol_get_gpl(const char *symbol);
#else #else
#ifdef CONFIG_MODVERSIONING #ifdef CONFIG_MODVERSIONS
/* Mark the CRC weak since genksyms apparently decides not to /* Mark the CRC weak since genksyms apparently decides not to
* generate a checksums for some symbols */ * generate a checksums for some symbols */
#define __CRC_SYMBOL(sym, sec) \ #define __CRC_SYMBOL(sym, sec) \
......
...@@ -144,11 +144,10 @@ config OBSOLETE_MODPARM ...@@ -144,11 +144,10 @@ config OBSOLETE_MODPARM
have not been converted to the new module parameter system yet. have not been converted to the new module parameter system yet.
If unsure, say Y. If unsure, say Y.
config MODVERSIONING config MODVERSIONS
bool "Module versioning support (EXPERIMENTAL)" bool "Module versioning support (EXPERIMENTAL)"
depends on MODULES && EXPERIMENTAL depends on MODULES && EXPERIMENTAL
help help
---help---
Usually, you have to use modules compiled with your kernel. Usually, you have to use modules compiled with your kernel.
Saying Y here makes it sometimes possible to use modules Saying Y here makes it sometimes possible to use modules
compiled for different kernels, by adding enough information compiled for different kernels, by adding enough information
......
...@@ -68,13 +68,6 @@ extern struct timezone sys_tz; ...@@ -68,13 +68,6 @@ extern struct timezone sys_tz;
extern int panic_timeout; extern int panic_timeout;
#ifdef CONFIG_MODVERSIONS
const struct module_symbol __export_Using_Versions
__attribute__((section("__ksymtab"))) = {
1 /* Version version */, "Using_Versions"
};
#endif
/* process memory management */ /* process memory management */
EXPORT_SYMBOL(do_mmap_pgoff); EXPORT_SYMBOL(do_mmap_pgoff);
EXPORT_SYMBOL(do_munmap); EXPORT_SYMBOL(do_munmap);
......
...@@ -725,7 +725,7 @@ static int obsolete_params(const char *name, ...@@ -725,7 +725,7 @@ static int obsolete_params(const char *name,
} }
#endif /* CONFIG_OBSOLETE_MODPARM */ #endif /* CONFIG_OBSOLETE_MODPARM */
#ifdef CONFIG_MODVERSIONING #ifdef CONFIG_MODVERSIONS
static int check_version(Elf_Shdr *sechdrs, static int check_version(Elf_Shdr *sechdrs,
unsigned int versindex, unsigned int versindex,
const char *symname, const char *symname,
...@@ -779,7 +779,7 @@ static inline int check_version(Elf_Shdr *sechdrs, ...@@ -779,7 +779,7 @@ static inline int check_version(Elf_Shdr *sechdrs,
{ {
return 1; return 1;
} }
#endif /* CONFIG_MODVERSIONING */ #endif /* CONFIG_MODVERSIONS */
/* Resolve a symbol for this module. I.e. if we find one, record usage. /* Resolve a symbol for this module. I.e. if we find one, record usage.
Must be holding module_mutex. */ Must be holding module_mutex. */
......
...@@ -45,7 +45,7 @@ O_TARGET := $(obj)/built-in.o ...@@ -45,7 +45,7 @@ O_TARGET := $(obj)/built-in.o
endif endif
endif endif
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
modules := $(obj-m) modules := $(obj-m)
touch-module = @mkdir -p $(MODVERDIR)/$(@D); touch $(MODVERDIR)/$(@:.o=.ko) touch-module = @mkdir -p $(MODVERDIR)/$(@D); touch $(MODVERDIR)/$(@:.o=.ko)
else else
...@@ -60,7 +60,7 @@ __build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \ ...@@ -60,7 +60,7 @@ __build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
# Module versioning # Module versioning
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
# $(call if_changed_rule,vcc_o_c) does essentially the same as the # $(call if_changed_rule,vcc_o_c) does essentially the same as the
# normal $(call if_changed_dep,cc_o_c), i.e. compile an object file # normal $(call if_changed_dep,cc_o_c), i.e. compile an object file
...@@ -153,7 +153,7 @@ quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ ...@@ -153,7 +153,7 @@ quiet_cmd_cc_o_c = CC $(quiet_modtag) $@
cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
%.o: %.c FORCE %.o: %.c FORCE
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
$(call if_changed_rule,vcc_o_c) $(call if_changed_rule,vcc_o_c)
else else
$(call if_changed_dep,cc_o_c) $(call if_changed_dep,cc_o_c)
...@@ -162,7 +162,7 @@ endif ...@@ -162,7 +162,7 @@ endif
# For modversioning, we need to special case single-part modules # For modversioning, we need to special case single-part modules
# to mark them in $(MODVERDIR) # to mark them in $(MODVERDIR)
ifdef CONFIG_MODVERSIONING ifdef CONFIG_MODVERSIONS
$(single-used-m): %.o: %.c FORCE $(single-used-m): %.o: %.c FORCE
$(touch-module) $(touch-module)
$(call if_changed_rule,vcc_o_c) $(call if_changed_rule,vcc_o_c)
...@@ -259,9 +259,9 @@ targets += $(multi-used-y) $(multi-used-m) ...@@ -259,9 +259,9 @@ targets += $(multi-used-y) $(multi-used-m)
# Rule to link modules ( .o -> .ko ) # Rule to link modules ( .o -> .ko )
# #
# With CONFIG_MODVERSIONING, generation of the final .ko is handled # With CONFIG_MODVERSIONS, generation of the final .ko is handled
# by scripts/Makefile.modver # by scripts/Makefile.modver
ifndef CONFIG_MODVERSIONING ifndef CONFIG_MODVERSIONS
quiet_cmd_link_module = LD [M] $@ quiet_cmd_link_module = LD [M] $@
cmd_link_module = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_MODULE) -o $@ $< init/vermagic.o cmd_link_module = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_MODULE) -o $@ $< init/vermagic.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment