[英]Why System.map does not have any entries for initialized data section for small objects (global)
I am sure there will be many global variables in linux kernel, however I wonder why System.map file doesn't have any global symbols. 我确定linux内核中会有很多全局变量,但是我想知道为什么System.map文件没有任何全局符号。
Thanks, -Hitesh. 谢谢,-Hitesh。
I do not really understand your question. 我不太明白你的问题。 Do you mean all the global variables in the source code must have it's address made visible to the user space?
您是说源代码中的所有全局变量都必须使其地址对用户空间可见吗? Well that is not needed I'm sure unless you are writing your own piece of code and need that for debugging purposes.
好吧,除非您正在编写自己的代码并将其用于调试目的,否则我肯定不需要。
System.map only contains exported symbols. System.map仅包含导出的符号。 Now some of these symbols get exported implicitly due to the nature of their declaration.
现在,由于声明的性质,其中一些符号被隐式导出。 Thus when a system call is declared with 'asmlinkage' it's address will show up in this file.
因此,当使用“ asmlinkage”声明系统调用时,其地址将显示在此文件中。 There may be other tags that do this implicitly or one can always use the EXPORT_SYMBOL macro to export a symbol.
可能还有其他标记隐式地执行此操作,或者始终可以使用EXPORT_SYMBOL宏导出符号。
Perhaps someone can list an exhaustive list of all such implicit ways by which a symbol gets exported. 也许有人可以列出导出符号的所有此类隐式方式的详尽列表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.