简体   繁体   English

为什么System.map没有针对小对象的初始化数据节的任何条目(全局)

[英]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.

相关问题 为什么我的 /proc/kallsyms 文件不包含 System.map 中的所有符号? - Why does my /proc/kallsyms file not contain all the symbols in System.map? System.map文件中地址的含义 - Meaning of address' in System.map file 内核 sys_call_table 地址与 system.map 中指定的地址不匹配 - Kernel sys_call_table address does not match address specified in system.map /boot/System.map*中的符号地址与/ proc / kallsyms中的符号地址不同 - Symbol addresses in /boot/System.map* are not identical to those in /proc/kallsyms Linux内核 - 为什么System.map中的函数地址是实时看到的地址之前的一个字节? - Linux Kernel - why a function's address in System.map is one byte preceding its address as seen in real time? 如何在全局偏移表中初始化不是函数的全局符号条目? - How are the entries for Global Symbols that are not functions initialized in the Global Offset Table? 为什么在用Java开发的应用程序中有一个透明但很小的顶部面板? - Why does there have a transparent but small top panel in application developed in Java? 为什么'/./,/^$/!d'在sed中有任何作用? - Why does '/./,/^$/!d' have any effect in sed? 为什么 C 中的全局数组(初始化)不完全算作 PSS - Why global array (initialized) in C is not totally counted as PSS 为什么在系统调用部分没有`execlp()` - Why isn't `execlp()` in the system call section
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM