System.map explained

In Linux, the file is a symbol table used by the kernel.

A symbol table is a look-up between symbol names and their addresses in memory. A symbol name may be the name of a variable or the name of a function. The System.map is required when the address of a symbol name, or the symbol name of an address, is needed. It is especially useful for debugging kernel panics and kernel oopses. The kernel does the address-to-name translation itself when CONFIG_KALLSYMS is enabled so that tools like ksymoops are not required.[1]

Internals

The following is part of a System.map file:[2] c041bc90 b packet_sklistc041bc94 b packet_sklist_lockc041bc94 b packet_socks_nrc041bc98 A __bss_stopc041bc98 A _endc041c000 A pg0ffffe400 A __kernel_vsyscallffffe410 A SYSENTER_RETURNffffe420 A __kernel_sigreturnffffe440 A __kernel_rt_sigreturnBecause addresses may change from one build to the next, a new System.map is generated for each build of the kernel.[3]

Symbol types

The character between the address and the symbol (separated by spaces) is the type of a symbol. The [[nm (Unix)|nm]] utility program on Unix systems lists the symbols from object files. The System.map is directly related to it, in that this file is produced by nm on the whole kernel program just like nm lists the symbols and their types for any small object programs.[4]

Some of these types are:

Filesystem location

After building the Linux kernel, System.map is located in the root of the source directory. However, some further software installation steps expect to locate the file elsewhere:[5]

See also

Notes and References

  1. Web site: FAQ/System.map - Linux Kernel Newbies . kernelnewbies.org . 2006-04-14 . 2014-04-06.
  2. Web site: Peter Jay Salzman . The system.map File . Rlworkman.net . 2003-05-28 . 2014-04-06.
  3. Web site: Kernel-HOWTO . faqs.org . 2014-04-06.
  4. Web site: nm(1): symbols from object files - Linux man page . Linux.die.net . 2014-04-06.
  5. Web site: Peter's Notes: System.map . Linuxmafia.com . 2003-05-29 . 2014-04-06.