Re: Exporting symbols from Modules to kernel code

Bjorn Ekwall (bj0rn@blox.se)
Sun, 10 Jan 1999 23:21:39 +0100 (CET)


Ravi wrote:
> This is a question regarding the kernel symbol table.
[...]
> register_symtab(&functions);
[...]
> When I do lsmod my module is listed
> When I do ksyms the functions are shown
> When I access the functions from another module it works
>
> But my application require that I access the functions from within
> the kernel. Specifically from kernel/drivers/block/ll_rw_blk.c and
> the fucntion add_request.
> When I try to compile the kernel it says that symbols function1 cannot
> be located.

The normal way to allow a module to have an influence on the resident
kernel is to have a set of "register_something()" and "unregister_something()"
functions that the module code can call.

This is the safe way to do it, since the module unloading mechanism will
ensure that there are no strange pointers left around after the module
is removed. (At least if the module developer has done the Right Thing (TM)).

Bjorn <bj0rn@blox.se>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/