Subject: Re: LKM on evbarm
To: None <port-arm@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: port-arm
Date: 07/01/2003 08:53:02
At 05:59 AM 7/1/2003, Reinoud Zandijk wrote:
>Hiya folks,
>
>just tried a new NetBSD-current installation with LKMs and all seems to go
>OK but for heaps of `relocation truncated to fit: R_ARM_PC25 label' thus
>failing to load LKM's
>
>On Mon, Jun 30, 2003 at 10:31:14AM +0100, Richard Earnshaw wrote:
> > I've never tried it.  But I suspect it's going to be a similar issue as
> > powerpc -- ie we need an equivalent of lkm/powerpc/lkmXXX.awk scripts to
> > handle ARM branch instructions.
>
>I guess we need so.... now i am not familiar with the `awk' scripts but
>that solution seems workable for now at least... why not build it in the
>modload ?

Because that's the wrong time to do it.  You do it when you build the
modules since the process of doing is constant and is link invariant.

What's the proper sequence to do a trampoline?  I think this might be
it but my arm's a bit rusty.

__wrap_foo:
         ldr pc, [pc, #-4]
         .word __real_foo

-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message