having System.map reflect the running kernel

Tue, 29 Aug 1995 03:25:50 -0400

Marty Leisner writes:
> Some applications (lsof? maybe others?) need a system map
> file which is an accurate reflection of the running kernel.
> I found the following scheme very convenient...
> I produce system.map files of form
> You can easily comment this out and use
> MAP_FILE=System.map
> to get the default behavior

Just some thoughts, no suggestions or flames intended ...

My first thought was why can't we do some build trickery to embed the
System.map in the kernel image and look at it through /proc. Then I
remembered that it wouldn't be pageable. Bummer. But what if there
were a way to put stuff in the kernel image and not load it into
memory at boot-time. Like a section at the end of the kernel image
that contains data that does not need to be in kernel-space, but is
specific to this particular image. Then you could register a func in
/proc to go and look at the file that the kernel image is in.
One-stop shopping for stuff like the System.map.