On Thu, Aug 03, 2006 at 05:55:17PM +0200, Fernando Apestegu?a wrote: > Hi! > > I'm doing some tests with a kernel module. I was compiling and inserting the > module without problems. > After an upgrade of part of my system (Anjuta C/C++ IDE and related things > like gcc etc...) I get this problem when trying to insert my module: > > module: version magic '2.6.15.6 preempt PENTIUM4 REGPARM gcc-4.1' should be > '2.6.15.6 preempt PENTIUM4 REGPARM gcc-4.0' > insmod: error inserting 'module.ko': -1 invalid module format. > > I guess that this is because the module was compiled with a more recent > version of gcc than the kernel was... am I right? Yes. > And now... how can I fix this? Should I recompile my kernel with gcc-4.1? Yes. > should I downgrade to gcc-4.0 again? If you want to, but I would just recommend rebuilding your kernel. > Is there any macro that I can use to avoid this checking? No, you want this check, it is there for a very good reason (different compiler versions output different code, so everything must be built with the same compiler version.) thanks, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/