The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Invalid module format - how does one fix this?
@ 2002-11-24 13:59 Ed Tomlinson
  2002-11-24 14:25 ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Tomlinson @ 2002-11-24 13:59 UTC (permalink / raw)
  To: linux-kernel

Hi,

2.5.49-mm1 works ok here (shpte enabled too).  I see two frustrating problems left
with the modules change (user perspective).  The most irratating one is messages like:

FATAL: Error inserting /lib/modules/2.5.49-mm1/kernel/ac97_codec.o: Invalid module format

I get this on about 10% of the modules I want to load.  How do I fix it?

The second is that automatic loading is not working.  Manually loading modules is a PITA.
What plans are there to fix this?

TIA
Ed Tomlinson

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid module format - how does one fix this?
  2002-11-24 13:59 Invalid module format - how does one fix this? Ed Tomlinson
@ 2002-11-24 14:25 ` Andi Kleen
  2002-11-24 14:59   ` Ed Tomlinson
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2002-11-24 14:25 UTC (permalink / raw)
  To: Ed Tomlinson; +Cc: linux-kernel

Ed Tomlinson <tomlins@cam.org> writes:

> FATAL: Error inserting /lib/modules/2.5.49-mm1/kernel/ac97_codec.o: Invalid module format
> 
> I get this on about 10% of the modules I want to load.  How do I fix it?

readelf -r module_in_question.o

then look at arch/$ARCH/kernel/module.c and find out which relocation
is not implemented. Then implement it. Enabling DEBUGP there and in 
kernel/module.c may also help. 

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid module format - how does one fix this?
@ 2002-11-24 14:50 J.E.J. Bottomley
  2002-11-24 15:30 ` Ed Tomlinson
  0 siblings, 1 reply; 5+ messages in thread
From: J.E.J. Bottomley @ 2002-11-24 14:50 UTC (permalink / raw)
  To: Ed Tomlinson; +Cc: James.Bottomley, linux-kernel

> 2.5.49-mm1 works ok here (shpte enabled too).  I see two frustrating
> problems left with the modules change (user perspective).  The most
> irratating one is messages like:

> FATAL: Error inserting /lib/modules/2.5.49-mm1/kernel/ac97_codec.o:
> Invalid module format

> I get this on about 10% of the modules I want to load.  How do I fix
> it?

It seems that the new module loader *requires* init routines (they were 
optional on the old one) so a lot of modules that are simply helper routines 
and didn't previously have an init now need one.

I fixed this on my 53c700.c library module by adding

no_module_init;

at the end of the file.

> The second is that automatic loading is not working.  Manually loading
> modules is a PITA. What plans are there to fix this?

This hasn't annoyed me enough that I've looked into it yet.  I suspec the new 
modprobe doesn't know about the in-kernel module names (or to look in 
/etc/modules.conf) yet.

James




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid module format - how does one fix this?
  2002-11-24 14:25 ` Andi Kleen
@ 2002-11-24 14:59   ` Ed Tomlinson
  0 siblings, 0 replies; 5+ messages in thread
From: Ed Tomlinson @ 2002-11-24 14:59 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

On November 24, 2002 09:25 am, Andi Kleen wrote:
> Ed Tomlinson <tomlins@cam.org> writes:
> > FATAL: Error inserting /lib/modules/2.5.49-mm1/kernel/ac97_codec.o:
> > Invalid module format
> >
> > I get this on about 10% of the modules I want to load.  How do I fix it?
>
> readelf -r module_in_question.o
>
> then look at arch/$ARCH/kernel/module.c and find out which relocation
> is not implemented. Then implement it. Enabling DEBUGP there and in
> kernel/module.c may also help.

Looking in i386/kernel/module.c, it should be using printk to tell me
what is missing.  I am not seeing these in my logs.  Is there some /proc or
/sys setting I need to change to see warnings?

Tia,
Ed Tomlinson

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Invalid module format - how does one fix this?
  2002-11-24 14:50 J.E.J. Bottomley
@ 2002-11-24 15:30 ` Ed Tomlinson
  0 siblings, 0 replies; 5+ messages in thread
From: Ed Tomlinson @ 2002-11-24 15:30 UTC (permalink / raw)
  To: J.E.J. Bottomley; +Cc: James.Bottomley, linux-kernel

On November 24, 2002 09:50 am, J.E.J. Bottomley wrote:
> > 2.5.49-mm1 works ok here (shpte enabled too).  I see two frustrating
> > problems left with the modules change (user perspective).  The most
> > irratating one is messages like:
> >
> > FATAL: Error inserting /lib/modules/2.5.49-mm1/kernel/ac97_codec.o:
> > Invalid module format
> >
> > I get this on about 10% of the modules I want to load.  How do I fix
> > it?
>
> It seems that the new module loader *requires* init routines (they were
> optional on the old one) so a lot of modules that are simply helper
> routines and didn't previously have an init now need one.
>
> I fixed this on my 53c700.c library module by adding
>
> no_module_init;
>
> at the end of the file.
>
> > The second is that automatic loading is not working.  Manually loading
> > modules is a PITA. What plans are there to fix this?
>
> This hasn't annoyed me enough that I've looked into it yet.  I suspec the
> new modprobe doesn't know about the in-kernel module names (or to look in
> /etc/modules.conf) yet.

Thanks James.  Including init.h and adding no_module_init fixes ac97_codec.
Now to see if the matrox fb stuff also can be fixed.

Ed Tomlinson

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-24 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-24 13:59 Invalid module format - how does one fix this? Ed Tomlinson
2002-11-24 14:25 ` Andi Kleen
2002-11-24 14:59   ` Ed Tomlinson
  -- strict thread matches above, loose matches on Subject: below --
2002-11-24 14:50 J.E.J. Bottomley
2002-11-24 15:30 ` Ed Tomlinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox