获取kernel各个数据段,代码段的地址及范围

来源:互联网 发布:免费电话软件 编辑:程序博客网 时间:2024/05/22 04:43

有的时候需要知道代码段,数据段,字符串段,已经初始话数据段等信息

记得添加:

#include <asm/sections.h>

printk("_text  is %08x--%08x , \         _data is %08x--%08x , \         __bss_start  is %08x--%08x , \         __init_begin is %08x--%08x , \         _sinittext  is %08x--%08x   , \         __initdata_begin  is %08x--%08x  , \         __start_rodata  is %08x--%08x \n " , \         _stext,_etext, \         _sdata,_edata,\         __bss_start,__bss_stop,\         __init_begin,__init_end,\         _sinittext,_einittext,\         __initdata_begin,__initdata_end,\         __start_rodata,__end_rodata\              );



 

原创粉丝点击