Subject: Re: Do LKMs work *at*all* on powerpc platforms?
To: None <gr@eclipsed.net>
From: Wolfgang Solfrank <ws@tools.de>
List: port-macppc
Date: 08/03/2000 17:45:55
Hi,

> > modload -o miscmod -emiscmod combined.o
> > combined.o: In function `miscmod_handle':
> > combined.o(.text+0x114): relocation truncated to fit: R_PPC_REL24 memcpy
> > combined.o(.text+0x140): relocation truncated to fit: R_PPC_REL24 memcpy
> > combined.o(.text+0x1f8): relocation truncated to fit: R_PPC_REL24 memcpy
> > modload: can't link `combined.o' creating `miscmod' bound to 0xe921b000
> > *** Error code 1

...

> Okay, that isn't *quite* true. miscmod(), the module's external entry
> point, looks like this:
> 
> miscmod( lkmtp, cmd, ver)
> struct lkm_table    *lkmtp;
> int         cmd;
> int         ver;
> {        
>     DISPATCH(lkmtp,cmd,ver,miscmod_handle,miscmod_handle,lkm_nofunc)
> }        

Hmm, I'm not sure about one of the three errors you get, however, two
of them are most likely the calls to lkm_nofunc (the last argument you
gave to the DISPATCH macro) and lkmdispatch (the last line in the
DISPATCH macro).  Try adding the LONGCALL attribute to the declaration
of those functions in <sys/lkm.h> and see how it works.

BTW, you might also want to try to add "-Wa,al" or something like this
to your compilation flags in order to get an assembly listing which
helps in finding the failing references.

Ciao,
Wolfgang
-- 
ws@TooLs.DE     Wolfgang Solfrank, TooLs GmbH 	+49-228-985800