Linux内核导出的符号 [英] Linux kernel exported symbols
问题描述
我想检查Linux内核导出的符号列表. 所以我启动命令,
I want to check the list of symbol exported by the Linux kernel. So I fire the command,
# cat /proc/kallsyms
0000000000000000 D per_cpu__irq_stack_union
0000000000000000 D __per_cpu_start
0000000000004000 D per_cpu__gdt_page
0000000000005000 d per_cpu__exception_stacks
000000000000b000 d per_cpu__idt_desc
000000000000b010 d per_cpu__xen_cr0_value
000000000000b018 D per_cpu__xen_vcpu
000000000000b020 D per_cpu__xen_vcpu_info
000000000000b060 d per_cpu__mc_buffer
000000000000c570 D per_cpu__xen_mc_irq_flags
这是我得到的输出. 我的问题是,此输出中每个字段的含义是什么? 第一个字段看起来像地址,第二个字段我没有得到任何参考. 有人可以向我解释第二字段中D,d,t,T,s的含义吗?
This is the output I got. My question is that, what is the meaning of each field in this output? The first field looks like the address, I didn't get any reference for second field. Can anybody explain to me the meaning of the values, D,d,t,T,s in second field?
推荐答案
第二列中的字符与nm
的输出具有相同的含义:
The characters in the second column have the same meaning they do in the output from nm
:
D
d
该符号位于已初始化的数据部分中.
D
d
The symbol is in the initialized data section.
S
s
该符号位于小对象的未初始化数据部分中.
S
s
The symbol is in an uninitialized data section for small objects.
T
t
该符号在文本(代码)部分中.
T
t
The symbol is in the text (code) section.
大写符号是全局/导出的;小写字母是本地未导出的符号.
Uppercase symbols are global/exported; lowercase are local unexported symbols.
这篇关于Linux内核导出的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!