Actually the above happens when you enable CONFIG_MODVERSIONS along with
CONFIG_KMOD. The part of my patch that included the matching to versioned
kernel symbols from Richard Henderson wasn't included in 2.1.105 for some
reason.
I am waiting to see if it appears in 2.1.10x (Alan currently has it in
his diff set), and if not then I'll have to stick a __MODULE_STRING into
all the get_module_symbol calls to make versioned kernels do the Right Thing.
Paul.
diff -u --new-file --recursive --exclude-from ../exclude linux.vanilla/kernel/module.c linux/kernel/module.c
--- linux.vanilla/kernel/module.c Sun Jun 7 20:03:45 1998
+++ linux/kernel/module.c Sun Jun 7 20:23:46 1998
@@ -946,6 +946,23 @@
return len;
}
+/*
+ * String comparison for non-co-versioned kernel and module.
+ */
+static int
+ncv_strcmp(const char *a, const char *b)
+{
+ size_t alen = strlen(a), blen = strlen(b);
+
+ if (blen == alen + 10 && b[alen] == '_' && b[alen+1] == 'R')
+ return strncmp(a, b, alen);
+ else if (alen == blen + 10 && a[blen] == '_' && a[blen+1] == 'R')
+ return strncmp(a, b, blen);
+ else
+ return strcmp(a, b);
+}
+
+
/*
* Gets the address for a symbol in the given module. If modname is
* NULL, it looks for the name in any registered symbol table. If the
@@ -966,7 +983,7 @@
for (i = mp->nsyms, sym = mp->syms;
i > 0; --i, ++sym) {
- if (strcmp(sym->name, symname) == 0) {
+ if (ncv_strcmp(sym->name, symname) == 0) {
return sym->value;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu