同时拥有 System.map 文件和/proc/kallsyms 有什么需要? [英] What is the need of having both System.map file and /proc/kallsyms?

查看:19
本文介绍了同时拥有 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/kallsyms 有动态加载模块的符号以及静态代码,System.map 是只有静态代码的符号表.

/proc/kallsyms 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 与实际内核不匹配 警告.所以在那种情况下/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 不仅仅用于调试内核 oopses.一些驱动程序需要 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 有什么需要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆