Subject: Re: Do LKMs work *at*all* on powerpc platforms?
To: gabriel rosenkoetter <gr@eclipsed.net>
From: Todd Whitesel <toddpw@best.com>
List: port-macppc
Date: 08/03/2000 01:19:39
> On Wed, Aug 02, 2000 at 11:06:58PM -0700, Todd Whitesel wrote:
> > Try "-mlong-calls" and see if that is recognized.
> > 
> > Various gcc ports have been introducing this switch, and in at least one
> > case it took a while before someone remembered to document it.
> 
> No dice, unfortunately. cc says "Invalid option `long-calls'".

Hum. I just checked -rnetbsd1-5 and the gcc there only appears to support
this for MIPS and NEC V800 series.

For powerpc you basically have to use the attribute in the prototype.
Code has been written to provide -mlongcalls on PowerPC, but it's not
in the public gcc tree yet -- not sure why, I'll look into it.

> Would compiling LKMs with this flag really fix all the problems, or
> will there still be the same trouble with the memcpy called by the lkm
> function that gets passed to load() not using the modified prototype?

The attribute only affects calls to that subroutine, it does not modify the
entry/exit code of the subroutine itself -- so yes, that flag (or attribute)
would deal with this.

Todd Whitesel
toddpw @ best.com