本文介绍了同时拥有System.map文件和/proc/kallsyms有什么需要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想知道 System.map 文件和 /proc/kallsyms 之间的区别.
我正在使用Linux 3.16通用内核.我知道这两个都是内核符号表..当我对此文件进行比较时,它们都具有相同的内容.
那么,两者都需要什么呢?

I just want to know the difference between System.map file and /proc/kallsyms.
I am using Linux 3.16 generic kernel. I know that both are the kernel symbol table.. When I did a compare on this files, both are having the same content.
So what is the need of having both?

推荐答案

/proc/kallsysms具有动态加载的模块以及静态代码的符号,而system.map是仅具有静态代码的符号表.

/proc/kallsysms have symbols of dynamically loaded modules as well static code and system.map is symbol tables of only static code.

您不确定如何在您的系统上使用system.map.当内核和system.map不匹配时,您会不断看到System.map does not match actual kernel警告.因此,在这种情况下,/proc/kallsyms是正在运行的内核的符号.

You can not be really sure if system.map will be available on your system. When kernel and system.map mismatch you keep seeing System.map does not match actual kernel warning. So in that case/proc/kallsyms is the symbols of running kernel.

System.map不仅对调试内核操作有用.一些驱动程序需要System.map来解析符号,因为它们是与内核头文件而不是glibc链接的.如果没有当前正在运行的特定内核的System.map,它们将无法正常工作.

System.map isn't just useful for debugging kernel oopses. A few drivers need System.map to resolve symbols since they're linked against kernel headers instead of glibc). They won't work correctly without the System.map for the particular kernel currently running.

有关 http://dirac.org/linux/system.map/的更多信息

这篇关于同时拥有System.map文件和/proc/kallsyms有什么需要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 12:29