summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-02-14 08:25:07 -0600
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2003-02-14 08:25:07 -0600
commit2ec54bc13faf3bdf83ba37a4b346256b0b5c0eee (patch)
tree76b6e087bc100ff6ce7c455b667912c278e9c7a5 /kernel
parent0e7d983baf0e669867183d9fecdeb7b83ac1940b (diff)
kbuild: Move the version magic generation into module postprocessing
Since we'll have to always do module postprocessing shortly, we can as well get rid of the special cased init/vermagic.o which needed to be compiled before descending, and instead include the current version magic string during post processing. For that purpose, the generation of the string is moved from init/vermagic.c to include/linux/vermagic.h. People who externally maintain modules will also be happy about that.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 828805bbee07..8a7b70fc4548 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -30,6 +30,7 @@
#include <linux/moduleparam.h>
#include <linux/errno.h>
#include <linux/err.h>
+#include <linux/vermagic.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/pgalloc.h>
@@ -725,6 +726,8 @@ static int obsolete_params(const char *name,
}
#endif /* CONFIG_OBSOLETE_MODPARM */
+static const char vermagic[] = VERMAGIC_STRING;
+
#ifdef CONFIG_MODVERSIONS
static int check_version(Elf_Shdr *sechdrs,
unsigned int versindex,
@@ -1036,9 +1039,6 @@ static void set_license(struct module *mod, Elf_Shdr *sechdrs, int licenseidx)
}
}
-/* From init/vermagic.o */
-extern char vermagic[];
-
/* Allocate and load the module: note that size of section 0 is always
zero, and we rely on this for optional sections. */
static struct module *load_module(void *umod,