Subject: Re: CVS commit: src
To: None <sommerfe@netbsd.org>
From: None <drochner@zel459.zel.kfa-juelich.de>
List: source-changes
Date: 01/24/1999 16:56:46
sommerfe@netbsd.org said:
> Modified Files:
> 	src/sbin/modload: modload.8 modload.c
> Log Message: Allow modload to load symbols for use by DDB. 

I've done a similar thing a while ago, especially to
ease the development of device drivers for our home-grown
hardware.
Seeing your comment about the sorting out of symbol
table entries - I can offer help here. I've put my "modload"
which contains this feature for FTP to
zelof1.zel.kfa-juelich.de:/pub/NetBSD/lkmx/modload.tar.gz
There are some changes in the LKM device interface - I'm
using lseek()/write() to get the module into the kernel
which is more straightforward than the ioctl() if there
are non-contigous data blocks (also good for ELF loading
btw) and am passing the symbol table address another way.
This doesn't affect the principle - the sorting stuff is
in "mksyms.c". A flag controls whether local symbols are
included - this might help debugging but requires that the
local symbol names of the loaded module are not already present
in the kernel's symbol table (call it a nlist() shortcoming).
This stuff is in regular use for at least 2 years, so
I'd call it somehow trustworthy.

I'm somehow hesitating to throw this into NetBSD's modload
just now because the LKM interface sucks at different places
that much that I don't even like to look at it...
cgd came up with ideas for a ld_so like scheme quite a
while ago (FreeBSD got it in the meantime), and I was
hoping that someone experienced in toolchain issues takes
a stab on it sooner or later.

best regards
Matthias