In Linux, the System.map 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]
The following is part of a System.map file: [2]
c041bc90bpacket_sklistc041bc94bpacket_sklist_lockc041bc94bpacket_socks_nrc041bc98A__bss_stopc041bc98A_endc041c000Apg0ffffe400A__kernel_vsyscallffffe410ASYSENTER_RETURNffffe420A__kernel_sigreturnffffe440A__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]
The character between the address and the symbol (separated by spaces) is the type of a symbol. The 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: [4]
A for absoluteB or b for uninitialized data section (called BSS)D or d for initialized data sectionG or g for initialized data section for small objects (global)i for sections specific to DLLsN for debugging symbolp for stack unwind sectionR or r for read only data sectionS or s for uninitialized data section for small objectsT or t for text (code) sectionU for undefinedV or v for weak objectW or w for weak objects which have not been tagged so- for stabs symbol in an a.out object file? for "symbol type unknown"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]