Messages in this thread | | | Date | Sun, 03 Nov 1996 13:01:53 -0600 | From | Robert Wuest <> | Subject | Finding System.map (was:Re: Kernel Profiling???? Please explain...) |
| |
Hans Lermen wrote: > > On Sun, 3 Nov 1996, DPD wrote: [snip] > > > > - make sure you have the System.map file that corresponds to your > > > > kernel > > > > in your root directory (this should be done automatically for > > > > you if you use "make zlilo" to create the kernel) > > How can I assure that I have the proper 'System.map' file??? > > After a 'make bzImage' you have /usr/src/linux/System.map, you should save > this along with the kernel image. If you boot different kernels, the > 'right' System.map should be '/System.map' (maybe via a link). > = > Hans > <lermen@fgan.de>
I currently store all of my kernels and System.map files in /boot. So I have zImage-2.0.24 and a corresponding System.map-2.0.24. And I use (in rc.local):
VERSION=`/bin/uname -a | /usr/bin/cut -d\ -f3`
in my rc.local to access the 'right' map (and create /etc/issue).
I like the idea of making a link to /System.map such that it would always be the right one, and immediately ran into the problem where if I apply the reverse patch to sock.c to profile the result, I have two 2.0.24 kernels. I'm thinking about something like using the following:
VEXT=`/bin/uname -a | /usr/bin/md5sum | cut -b1-4`
and having System.map-${VEXT} files in /boot. Then a:
ln -sf /boot/System.map-${VEXT} /System.map
should get the right file (if 4 digits is enough to always be unique).
Two questions:
1. Is there a standard way to get the exact uname info from an unbooted kernel image so I know what VEXT is before rebooting ( to install System.map-xxxx)? I can find the string in my /usr/src/linux/vmlinux file.
2. Is there a way to know what boot image was booted in a running system? I could just run the kernel image through md5sum to get an extension.
Maybe there's a better way to get a unique identifier. Something that can be determined before and after booting a new kernel.
Thanks, Robert -- mailto:rwuest@ix.netcom.com Empowered by Linux.
| |