linux -/proc/kallsyms中的t和t有什么区别

标签 linux linux-kernel export symbols kernel-module

这是来自 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

Tt 有什么区别?
我知道 Tt 用于文本(代码)部分。

我猜想 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/

相关文章:

import - ES6中如何导出导入的对象?

c++ - GNU/Linux : getting value of option 15 of DHCP without using `getnameinfo`

linux - kmalloc 中 GFP_USER 标志的用途是什么?

LINUX 权限问题

bash - BASH 脚本中的 export 关键字

java.security.KeyStore 仅显示 p12 文件中两个证书之一

linux - 仅在键入字符后退格删除 bash 提示

c - c 中 chdir 的奇怪错误

linux - 在 RHEL 6 上安装 R

linux-kernel - linux内核,结构bio : how pages are read/written