Linux 内核导出符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10070861/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Linux kernel exported symbols
提问by beparas
I want to check the list of symbol exported by the Linux kernel. So I fire the command,
我想检查 Linux 内核导出的符号列表。所以我发出命令,
# 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
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?
这是我得到的输出。我的问题是,此输出中每个字段的含义是什么?第一个字段看起来像地址,我没有得到第二个字段的任何参考。任何人都可以向我解释第二个字段中值 D,d,t,T,s 的含义吗?
采纳答案by geekosaur
The characters in the second column have the same meaning they do in the output from nm
:
第二列中的字符具有与以下输出中相同的含义nm
:
D
d
The symbol is in the initialized data section.
S
s
The symbol is in an uninitialized data section for small objects.
T
t
The symbol is in the text (code) section.
D
d
该符号位于已初始化的数据部分。
S
s
该符号位于小对象的未初始化数据段中。
T
t
该符号位于文本(代码)部分。
Uppercase symbols are global/exported; lowercase are local unexported symbols.
大写符号是全局/导出的;小写是本地未导出的符号。