Http://blog.chinaunix.net/uid-24148050-id-95497.html
System.map is a kernel symbol table file, produced by the "nm vmlinux" command, located in the source root directory.
The so-called "symbol" is the function name, global variable name, and so on, this table records these "symbols" in the kernel of the running address. (This is effective address, virtual address)
Here is a fragment of the file:
The so-called "symbol" is the function name, global variable name, and so on, this table records these "symbols" in the kernel of the running address. (This is effective address, virtual address)
Here is a fragment of the file:
C032ee18 T Genl_init
C032ef18 T Netfilter_init
C032EFCC T Netfilter_log_init
c032f020 T Netfilter_queue_init
c032f074 T Nfnetlink_init
C032F0FC T Nfnetlink_queue_init
C032f1e4 T Nfnetlink_log_init
C032f2d0 T Nf_conntrack_init
c032f48c T Nf_conntrack_standalone_init
c032f57c T Nf_conntrack_expect_init
c032f67c T Ctnetlink_init
From the above, Netfilter_init () is the address of 0xc032ef18
This is useful for debugging the kernel. For example, the kernel calls a function pointer, want to know which function it is pointing to, directly PRINTK the function pointer address, according to the address of the table is OK.
Symbol type |
Name |
Description |
A |
Absolute |
The value of the symbol is absolute and will not be changed during further linking |
B |
Bss |
The symbol is in the uninitialized data area or area (section), that is, in the BSS segment |
C |
Common |
The symbols are public. The common symbol is uninitialized data. When linking, multiple common symbols may have the same name. If the symbol is defined elsewhere, the common symbol is considered to be an undefined reference |
D |
Data |
The symbol is in the initialized data area |
G |
Global |
A symbol is a symbol in a small object that has been initialized in the data area. Some destination file formats allow for more efficient access to small data objects, such as a global integer variable |
I |
Inderect |
A symbol is an indirect reference to another symbol |
N |
Debugging |
Symbol is a debug symbol |
R |
Read only |
Symbol in a read-only data area |
S |
Small |
Symbol is a symbol in the data area that is not initialized by a small object |
T |
Text |
Symbols are symbols in the code area |
U |
Undefined |
The symbol is external and has a value of 0 (undefined) |
- |
Stabs |
A symbol is a stab symbol in the a.out destination file that is used to save debugging information |
? |
Unknown |
The type of the symbol is unknown or related to the specific file format |
PS. After the Linux kernel is started, you can view the symbol table by cat/proc/kallsyms.
To view a command for a symbol table
Nm-n Enetdbg.ko
LD Enetdbg.ko--print-map