Re: A more accurate System.map, including modules

Keith Owens (kaos@ocs.com.au)
Mon, 22 Sep 1997 21:59:29 +1000


On Sun, 21 Sep 1997 22:55:16 +0200,
Gerd Knorr <kraxel@goldbach.isdn.cs.tu-berlin.de> wrote:
>In article <19970921172651.15582.qmail@mail.ocs.com.au>, you wrote:
>>ftp://ftp.ocs.com.au/make_System_map.pl.gz (3.5K) builds a more
>>accurate map from your existing System.map, the information from
>>/proc/ksyms and your modules directories.
>
>Why don't you use insmod's -m switch to get the module symbols?
>A small wrapper script for insmod does a quite good job here.

That is another option but suffers from a few problems.

The output format is not compatible with System.map, no big deal, that
is what sed/grep/awk/perl are for.

-m only works on insmod, not on modprobe so you must specify the exact
location.

When modules are deleted, there is no easy way of detecting the fact
with this approach. It gets very confusing when another module is
loaded and reuses the space.

No way of persuading kerneld to generate the map when kerneld loads
modules.

Basically the insmod -m approach is fine for static environments where
you control which modules are loaded but I wanted something that would
work with kerneld as well. Also my approach lets me double check ksyms
against System.map and the modules to detect any mismatch in the input
data.