Subject: Re: One LKM calls functions exported by another LKM
To: Christos Zoulas <firstname.lastname@example.org>
From: Quentin Garnier <email@example.com>
Date: 03/10/2006 14:55:32
Content-Type: text/plain; charset=us-ascii
On Fri, Mar 10, 2006 at 01:49:52PM +0000, Christos Zoulas wrote:
> In article <20060309100243.BD4E763B102@mail.netbsd.org>,
> George Chen <firstname.lastname@example.org> wrote:
> >Hi guys,
> >I'm writing LKM (Loadable Kernel Module) and find I have to let LKM-A ca=
> >functions exported by LKM-B. But I don't know how to implement it.
> >The function is spucall(), declared as usual function in LKM-B.=20
> >LKM-B: int spucall(int cmd);
> >it is referred to in LKM-A as below.
> >LKM-A: extern int spucall(int cmd);
> I don't think you can do this with our current lkm framework. The closest
> you can get is to link both lkms into one and load it as one unit.
Of course he can. It's been very easy since ksyms(4), but it was
already possible before that by keeping the result of the link and using
it to load the second module.
Quentin Garnier - email@example.com - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
-----END PGP SIGNATURE-----