On Tuesday 30 January 2001 09:15, Olaf Petzold wrote:
> Am Mon, 29 Jan 2001 schrieben Sie:
> > AFAIK the only way to access functions that exist in kernel space is via
> > explicit calls to a "device driver" which could be read/write but are
> > much more commonly done via the standard ioctl(2) mechanism.  There
> > simply is no way to directly "call" such a function because the kernel is
> > not in the address space of any user task.
> >     Norm
>
> I guess the main problem would be how can the program find his data segment
> / stack etc. because it in different memory regions in user and kernel
> space. The normal way is to share source code and share data in shm or use
> fifos/devices. Nevertheless, a kernel module has to be compiled as module,
> a user programm as such. User programs afford elf sections there is nothing
> for kernel modules, further more main vs. init_module. Isn't such symbol in
> the kernel module maybee you will able to insmod/rmmod the module without
> crash but it isn't exceuted by the kernel (nice experience on c++ with c++
> linkage of these symbols)

IIRC, the kernel module loader does load modules without init_module(), and I 
think it should be possible to load kernel modules as shared libraries as 
well. In the case of a shared library, the "host" application can just look 
up a certain init function, and that function could call functions imported 
from the application as it needs for initialization.

However, it seems that this init function has to be named init_module() for 
this to work without kernel hacks... Is there a kernel API to manually look 
for "local" symbols like init_module()?


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to