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

Re: [MiNT] Re: fatal error handling



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.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org