lkml.org 
[lkml]   [2004]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] modpost warnings with external modules w/o modversions
On Mon, Jul 19, 2004 at 02:51:06PM +0200, Johannes Stezenbach wrote:
> Hi,
>
> when building external modules (DVB drivers in this case)
> for a kernel without CONFIG_MODVERSIONS I get a number of:
>
> make[1]: Entering directory `/usr/src/linux-2.6.8-rc1'
> Building modules, stage 2.
> MODPOST
> *** Warning: "dvb_unregister_frontend_new" [.../dvb-kernel/build-2.6/ves1x93.ko] has no CRC!
>
>
> I believe that there is a small bug in modpost.c which the
> patch below attempts to fix.

Pavel Roskin posted a better patch for the same problem.
I just have not come around to it yet.

Here is an (outdated maybe) copy of the patch.

Sam

--- linux.orig/scripts/Makefile.modpost
+++ linux/scripts/Makefile.modpost
@@ -51,8 +51,8 @@
# Includes step 3,4
quiet_cmd_modpost = MODPOST
cmd_modpost = scripts/modpost \
- $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
- $(filter-out FORCE,$^)
+ $(if $(CONFIG_MODVERSIONS),-m) $(if $(KBUILD_EXTMOD),-i,-o) \
+ $(symverfile) $(filter-out FORCE,$^)

.PHONY: __modpost
__modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE
--- linux.orig/scripts/modpost.c
+++ linux/scripts/modpost.c
@@ -342,7 +342,6 @@ handle_modversions(struct module *mod, s
crc = (unsigned int) sym->st_value;
add_exported_symbol(symname + strlen(CRC_PFX),
mod, &crc);
- modversions = 1;
}
break;
case SHN_UNDEF:
@@ -648,7 +647,6 @@ read_dump(const char *fname)

if (!(mod = find_module(modname))) {
if (is_vmlinux(modname)) {
- modversions = 1;
have_vmlinux = 1;
}
mod = new_module(NOFAIL(strdup(modname)));
@@ -695,11 +693,14 @@ main(int argc, char **argv)
char *dump_read = NULL, *dump_write = NULL;
int opt;

- while ((opt = getopt(argc, argv, "i:o:")) != -1) {
+ while ((opt = getopt(argc, argv, "i:mo:")) != -1) {
switch(opt) {
case 'i':
dump_read = optarg;
break;
+ case 'm':
+ modversions = 1;
+ break;
case 'o':
dump_write = optarg;
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.045 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site