[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Re: fatal error handling



On Wed, Dec 09, 1998 at 11:25:51AM +0100, Andreas Schwab wrote:
> Thomas Binder <gryf@hrzpub.tu-darmstadt.de> writes:
> 
> |> Anyone took a look at how Linux handles its loadable modules (which
> |> useually replace/enhance kernel calls) and whether the principle could
> |> be used somehow?
> 
> The way Linux does it is quite simple.  When a module is loaded some piece
> of kernel memory is allocated, the module code is put there and and
> relocated while resolving symbol references against the list of exported
> kernel symbols.  Then the module init function is called which registers
> itself with the kernel.  This is very much similar to the way dynamic
> linking was done on old BSD systems.  The modules are just ordinary object
> files, except that they must contain some special symbols for maintaining
> the necessary information that is needed by insmod.

Doesn't this require position independent code?  If so, does -fpic
work for the current MiNT gcc?

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de