modpost warnings with external modules w/o modversions
PATCH 1/1 modpost warnings with external modules w/o modversions
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.
scripts/modpost.c renamed from scripts/modpost.c.orig +0 -1
@@ -649,7 +649,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)));
Johannes
Quoted 5 lines · Johannes Stezenbach
Hi,
when building external modules (DVB drivers in this case) for a kernel without
CONFIG_MODVERSIONSI get a number of:
Quoted 8 lines
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.cwhich 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
scripts/Makefile.modpost +2 -2
@@ -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
scripts/modpost.c +4 -3
@@ -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 ;
Quoted 12 lines · On Mon, Jul 19, 2004 at 04:59:11PM +0200, [email protected] wrote:
Quoted 11 lines · Johannes Stezenbach
Hi,
when building external modules (DVB drivers in this case) for a kernel without
CONFIG_MODVERSIONSI 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!
Quoted 7 lines
Quoted 2 lines
I believe that there is a small bug in
modpost.cwhich 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.
OK, that worked (patch applied with 1 line offset, I include a refreshed patch for 2.6.8-rc1 below).
I also tested with CONFIG_MODVERSIONS (I never used that before), and that seems to work, too.
Thanks,
Johannes
scripts/Makefile.modpost renamed from scripts/Makefile.modpost.orig +2 -2
@@ -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
scripts/modpost.c renamed from scripts/modpost.c.orig +4 -3
@@ -343,7 +343,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 :
@@ -649,7 +648,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)));
@@ -696,11 +694,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 ;
Hi,
Quoted 19 lines · On Mon, Jul 19, 2004 at 07:36:10PM +0200, I wrote:
Quoted 18 lines · On Mon, Jul 19, 2004 at 04:59:11PM +0200, [email protected] wrote:
Quoted 5 lines · Johannes Stezenbach
Hi,
when building external modules (DVB drivers in this case) for a kernel without
CONFIG_MODVERSIONSI get a number of:Quoted 8 lines
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.cwhich 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.
Quoted 7 lines
Quoted 1 line
Here is an (outdated maybe) copy of the patch.
OK, that worked (patch applied with 1 line offset, I include a refreshed patch for 2.6.8-rc1 below).
I also tested with
CONFIG_MODVERSIONS(I never used that before), and that seems to work, too.
Is there any chance that this patch could go into mainline kernel anytime soon? It seems that this isn't even in bk-kbuild that went into 2.6.8-rc2-mm1.
Johannes
scripts/Makefile.modpost renamed from scripts/Makefile.modpost.orig +2 -2
@@ -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
scripts/modpost.c renamed from scripts/modpost.c.orig +4 -3
@@ -343,7 +343,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 :
@@ -649,7 +648,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)));
@@ -696,11 +694,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 ;
Quoted 4 lines · Johannes Stezenbach
Is there any chance that this patch could go into mainline kernel anytime soon? It seems that this isn't even in bk-kbuild that went into 2.6.8-rc2-mm1.
It's an oversight that it was not included.
It will be there in next round of kbuild patches.
Sam