Linux的system.map的symbol是如何生成的
时间: 2023-05-30 13:06:16 浏览: 51
Linux的system.map文件是由内核编译时生成的。在编译内核时,编译器会创建一个vmlinux文件,其中包含内核代码的所有符号和地址。然后,一个工具称为nm(符号表管理器)会扫描vmlinux文件,提取所有符号和地址,并将它们写入system.map文件中。这个过程会在内核编译完成后自动进行,无需额外的操作。system.map文件提供了内核中所有符号的地址和名称,包括函数、变量和其他对象。它是系统调试和分析的重要工具。
相关问题
system.map symbol
A system.map symbol is a symbol table that provides information about the kernel's symbols and their corresponding memory addresses. It is typically generated during the compilation of the Linux kernel and contains information about the functions, variables, and other symbols that are defined in the kernel code. This symbol table is used by various tools and utilities, such as the kernel debugger, to map the kernel's symbols to their corresponding memory locations. The system.map file is located in the root directory of the kernel source code and is updated each time the kernel is compiled.
Linux的system.map的symbol
Linux的system.map文件包含了内核中所有可用符号的地址列表,包括函数、变量和存储区域等等。这个文件通常由内核编译时生成,用于调试和性能分析。以下是一些常见的符号:
- 函数符号:以函数名开头,后跟其地址。例如, "do_fork" : ffffffff8112e500 表示 do_fork 函数的地址为 0xffffffff8112e500。
- 变量符号:以变量名开头,后跟其地址。例如, "sys_call_table" : ffffffff81a002c0 表示 sys_call_table 变量的地址为 0xffffffff81a002c0。
- 存储区域符号:以存储区域名开头,后跟其地址和大小。例如, "__initdata_begin" : ffffffff81100000 __initdata_end - __initdata_begin 表示 __initdata 区域的起始地址为 0xffffffff81100000,大小为 __initdata_end - __initdata_begin。
除了这些常见符号之外,system.map文件还可以包含其他类型的符号,如重定位符号、动态符号等等。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![mp4](https://img-home.csdnimg.cn/images/20210720083504.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)