What is the difference between T and t in /proc/kallsyms

岁酱吖の 提交于 2020-12-31 10:50:12

问题


This is a part of text file from System.map and /proc/kallsyms.

ffffffff8106c260 T leave_mm
ffffffff8106c340 t do_flush_tlb_all
ffffffff8106c390 t flush_tlb_func
ffffffff8106c510 T native_flush_tlb_others
ffffffff8106c540 T flush_tlb_current_task
ffffffff8106c600 T flush_tlb_mm_range
ffffffff8106c770 T flush_tlb_page
ffffffff8106c820 T flush_tlb_all
ffffffff8106c840 T flush_tlb_kernel_range

What is the difference between T and t?
I know that T or t is for text (code) section.

I guessed T could be invoked from kernel module and t couldn't be invoked from kernel module.

Let me know exact meaning and difference between them.


回答1:


The file /proc/kallsyms holds all the symbols that the kernel knows about and which are therefore accessible to your modules since they share the kernel's codespace.

From man nm:

The symbol value, in the radix selected by options (see below), or hexadecimal by default. The symbol type. At least the following types are used; others are, as well, depending on the object file format. If lowercase, the symbol is usually local; if uppercase, the symbol is global (external). There are however a few lowercase symbols that are shown for special global symbols (u, v and w).

T t The symbol is in the text (code) section.

T means that symbol is globally visible, and can be used in other kernel's code.



来源:https://stackoverflow.com/questions/39120818/what-is-the-difference-between-t-and-t-in-proc-kallsyms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!