简体   繁体   中英

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.

Thanks, -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. 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. There may be other tags that do this implicitly or one can always use the EXPORT_SYMBOL macro to export a symbol.

Perhaps someone can list an exhaustive list of all such implicit ways by which a symbol gets exported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM