LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-04-2019, 06:45 AM   #1
lioh
Member
 
Registered: Aug 2019
Location: Switzerland
Distribution: Slackware
Posts: 70

Rep: Reputation: Disabled
System.map


Hi all,

I have a question concerning the System.map file. If I have understood https://rlworkman.net/system.map/correctly e.g. klogd or ps look for /boot/System.map or /boot/System.map-$KERNELVERSION, so e.g. /boot/System.map-5.3.7. On a generic or huge kernel, would it also look for e.g /boot/System.map-generic-$KERNELVERSION?

Greetings

Lioh
 
Old 11-04-2019, 02:11 PM   #2
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, Manjaro (for gaming)
Posts: 209

Rep: Reputation: 147Reputation: 147
I think it works according to what's defined in the top level Makefile, hence, the symlinks that are used (e.g. System.map -> System.map-generic-4.19.81)

Code:
VERSION = 5
PATCHLEVEL = 3
SUBLEVEL = 8
EXTRAVERSION =
NAME = Bobtail Squid
I don't use distro kernels and I always make mine match those variables, (e.g. currently System.map-5.3.8) and I don't use symlinks.

Last edited by TheRealGrogan; 11-04-2019 at 02:24 PM. Reason: grammar typos
 
Old 11-04-2019, 07:23 PM   #3
chrisVV
Member
 
Registered: Aug 2010
Posts: 378

Rep: Reputation: 200Reputation: 200Reputation: 200
Quote:
Originally Posted by lioh View Post
Hi all,4.19.8
I have a question concerning the System.map file. If I have understood https://rlworkman.net/system.map/correctly e.g. klogd or ps look for /boot/System.map or /boot/System.map-$KERNELVERSION, so e.g. /boot/System.map-5.3.7. On a generic or huge kernel, would it also look for e.g /boot/System.map-generic-$KERNELVERSION?
Look at how the modules directory in /lib/modules identifies itself. On x86_64 for the slackware provided kernel, for kernel-huge-4.19.81 the files System.map and System.map-4.19.81 will be looked for. Your home produced kernels will follow the same system unless you have set a suffix in CONFIG_LOCALVERSION in your kernel configuration file. On i686 SMP. the slackware provided kernel sets CONFIG_LOCALVERSION to '-smp', so the kernel looks for System.map and System.map-4.19.81-smp, and your modules are in /lib/modules/4.19.81-smp.

Last edited by chrisVV; 11-04-2019 at 07:26 PM.
 
Old 11-04-2019, 10:56 PM   #4
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, Manjaro (for gaming)
Posts: 209

Rep: Reputation: 147Reputation: 147
... except they are not named that way. For example kernel-huge has corresponding System.map-huge-4.19.80 and Slackware has a System.map symlink pointing to it. You're probably right that the system would look for System.map-4.19.81 if you were to rename it that way (because that's what was defined in the Makefile, which also is what determines the name of the modules directory)
 
Old 11-05-2019, 06:25 AM   #5
chrisVV
Member
 
Registered: Aug 2010
Posts: 378

Rep: Reputation: 200Reputation: 200Reputation: 200
Quote:
Originally Posted by TheRealGrogan View Post
... except they are not named that way. For example kernel-huge has corresponding System.map-huge-4.19.80 and Slackware has a System.map symlink pointing to it. You're probably right that the system would look for System.map-4.19.81 if you were to rename it that way (because that's what was defined in the Makefile, which also is what determines the name of the modules directory)
I was answering the question asked, which was "If I have understood https://rlworkman.net/system.map/correctly e.g. klogd or ps look for /boot/System.map or /boot/System.map-$KERNELVERSION, so e.g. /boot/System.map-5.3.7. On a generic or huge kernel, would it also look for e.g /boot/System.map-generic-$KERNELVERSION?"

The answer to that question is, as I said, that for kernel-huge-4.19.81 on x86_64 klogd will look for /boot/System.map and /boot/System.map-4.19.81. Slackware names the map file /boot/System.map-huge-4.19.81 when installing for packaging convenience (which wouldn't be found by klogd) but provides a symlink to /boot/System.map so that it will be found. I think providing a symlink instead to /boot/System.map-4.19.81 would make slackware's kernel a better neighbour, and as I also run custom kernels with their own map files, I manually change slackware's symlink to do so to prevent clashes. All the System.map files on my system are properly versioned.

The Makefile does not of itself determine the name of the modules directory, nor the look-up name of the map file. Those names also depend on the kernel's configuration file, and in particular the value of CONFIG_LOCALVERSION.

Last edited by chrisVV; 11-05-2019 at 08:09 AM.
 
1 members found this post helpful.
Old 11-05-2019, 12:16 PM   #6
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 420

Rep: Reputation: 272Reputation: 272Reputation: 272
I think that https://rlworkman.net/system.map page is very old. System.map is not used nowadays as far as I know. At least I have not installed it for years. procps-ng sources don't refer to file System.map at all, and klogd is started with -x in /etc/rc.d/rc.syslog with a comment explaining '-x' = turn off broken EIP translation (so does not read System.map).

If you want to see the symbol table, look at /proc/kallsyms. You need to be root to see the addresses.
 
1 members found this post helpful.
Old 11-05-2019, 05:23 PM   #7
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, Manjaro (for gaming)
Posts: 209

Rep: Reputation: 147Reputation: 147
That's what I thought too, it's only used for oops decoding now I think (maybe some out of tree module build scripting?). I still put mine in /boot named according to my kernel version strings, but some distros don't even install one anymore, you'd have to generate it if you want it.

There was a time (in Slackware) when syslog-ng used to bomb out if the kernel was compiled without "Load all symbols for debugging/ksymoops" (that'd be /proc/kallsyms I think) but we don't use that anymore and I don't think that's the case anymore.

Last edited by TheRealGrogan; 11-05-2019 at 05:27 PM.
 
Old 11-06-2019, 01:04 AM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,396

Rep: Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974
Yeah, that particular page is *old* and almost surely out of date (if not completely wrong) in various ways.
 
Old 11-06-2019, 02:21 AM   #9
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 420

Rep: Reputation: 272Reputation: 272Reputation: 272
Quote:
Originally Posted by TheRealGrogan View Post
That's what I thought too, it's only used for oops decoding now I think
Not even that. In kernel sources, linux/Documentation/admin-guide/bug-hunting.rst
Code:
.. note::

  ``ksymoops`` is useless on 2.6 or upper.  Please use the Oops in its original
  format (from ``dmesg``, etc).  Ignore any references in this or other docs to
  "decoding the Oops" or "running it through ksymoops".
  If you post an Oops from 2.6+ that has been run through ``ksymoops``,
  people will just tell you to repost it.
And for that same reason, Slackware starts klogd with option -x.
 
1 members found this post helpful.
Old 11-06-2019, 05:04 PM   #10
bamunds
Member
 
Registered: Sep 2013
Location: Mounds View MN
Distribution: Slackware64-14.2 XDM/WMaker
Posts: 667

Rep: Reputation: 206Reputation: 206Reputation: 206
So for us home build kernel makers, does that mean we can modify our steps to no longer bother with cp System.map to /boot/System.map? It would help me with my small /boot partition, on encrypted disc, as the kernel continues to grow larger since kernel 3.18 days of 14.2 release. Thanks
 
Old 11-07-2019, 01:13 AM   #11
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 420

Rep: Reputation: 272Reputation: 272Reputation: 272
Yes, System.map is useless. It can't list the right addresses because the addresses change at every boot because of KASLR.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add your local knowledge to the map with Google Map Maker for the United States mjolnir General 4 05-04-2011 05:27 PM
Kernel virtual memory map TO Board memory map -----> Mapping !rajkums! Linux - Embedded & Single-board computer 0 10-18-2008 10:21 AM
"Partition map has no partition map entry!" aquaboot Debian 3 01-09-2007 07:52 AM
SYSERR(root): hash map "generics": missing map file /etc/mail/genericstable.db? singying304 Linux - Networking 4 02-28-2005 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration