System.map
   HOME

TheInfoList



OR:

In
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
, the file is a
symbol table In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier (or symbols), constants, procedures and functions in a program's source code is associated with info ...
used by the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
. 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.


Internals

The following is part of a System.map file: c041bc90 b packet_sklist c041bc94 b packet_sklist_lock c041bc94 b packet_socks_nr c041bc98 A __bss_stop c041bc98 A _end c041c000 A pg0 ffffe400 A __kernel_vsyscall ffffe410 A SYSENTER_RETURN ffffe420 A __kernel_sigreturn ffffe440 A __kernel_rt_sigreturn Because addresses may change from one build to the next, a new System.map is generated for each build of the kernel.


Symbol types

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. Some of these types are: * A for absolute * B or b for uninitialized data section (called BSS) * D or d for initialized data section * G or g for initialized data section for small objects (global) * i for sections specific to DLLs * N for debugging symbol * p for stack unwind section * R or r for read only data section * S or s for uninitialized data section for small objects * T or t for text (code) section * U for undefined * V or v for weak object * W or w for weak objects which have not been tagged so * - for stabs symbol in an a.out object file * ? for "symbol type unknown"


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: * as
/boot/ In Linux, and other Unix-like operating systems, the directory holds files used in booting the operating system. The usage is standardized in the Filesystem Hierarchy Standard. Contents The contents are mostly Linux kernel files or boot loader ...
System.map-$(
uname uname (short for ''unix name'') is a computer program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it. History The uname system cal ...
-r)
* building SVGAlib expects to find /lib/modules/$(uname -r)/build/System.map


See also

*
Linux kernel oops In computing, an oops is a serious but non-fatal error in the Linux kernel. An oops often precedes a kernel panic, but may in some cases allow continued operation with compromised reliability. The term does not stand for anything, other than th ...
* Kernel panic


References

Executable file formats Linux kernel {{linux-stub