这是来自 System.map 和 /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
T
和 t
有什么区别?
我知道 T
或 t
用于文本(代码)部分。
我猜想 T
可以从内核模块调用而 t
不能从内核模块调用。
让我知道它们的确切含义和区别。
最佳答案
文件/proc/kallsyms 包含内核知道的所有符号,因此您的模块可以访问这些符号,因为它们共享内核的代码空间。
来自 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
表示该符号全局可见,可以在其他内核代码中使用。
关于linux -/proc/kallsyms中的t和t有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39120818/