1. /proc/kallsyms列出了linux内核导出的所有符号及对应的地址。
基本格式是: 逻辑地址 标识 符号(内核导出的符号),如00100000 A phys_startup_32。
一些典型的内容如下所示:
- c0100000 A _text 注:表示内核代码第一个字节的地址
- c02fa1af A _etext 注:内核代码结束的位置,之后为内核初始化的数据
- c03e1b40 A _edata 注:内核初始化数据结束,之后为未初始化数据
- c043a068 A _end 注:内核未初始化数据结束
标识分为A、T、t、W、R、D等,分别意义如下:
标识说明: 小写字母表示局部; 大写字母表示全局(外部).
-
A
The symbol’s value is absolute, and will not be changed by further linking. -
B
The symbol is in the uninitialized data section (known as BSS). -
C
The symbol is common. Common symbols are uninitialized data. When linking, multiple common symbols may appear with the same name. If the symbol is defined anywhere, the common symbols are treated as undefined references. For more details on common symbols, see the d