来源:百度文库 编辑:九乡新闻网 时间:2024/05/01 16:32:38
解读System.map
部分摘录:
00000000 A agp_frontend_cleanup
c0127350 t kmem_slab_destroy
c0127430 T kmem_cache_create
c02a0ea0 R ide_pio_timings
c02aee28 r usb_bandwidth_option
c02c68bf ? __kstrtab_get_zeroed_page
c02c68cf ? __kstrtab___free_pages
c02cfe00 d real_mode_gdt_entries
c02d028c D kstack_depth_to_print
c03218c0 B irq_err_count
c03218c4 b root_irq_dir
其中每项有三部分组成:
第三部分是项目的名称
第一部分是项目在内核中的偏移量;
第二部分是项目的类型 各种类型的特征代码的意义
A:表示全局函数或变量
比如其中的agp_frontend_cleanup在原码中的定义为:
extern void agp_frontend_cleanup(void);
B:表示 静态/全局/原子 变量|数组
比如上面的irq_err_count在原码中的定义分别为:
extern atomic_t irq_err_count; //include\asm-i386\Hw_irq.
h
atomic_t irq_err_count; //arch\i386\kernel\Irq.c
static volatile unsigned long irq_err_count; //arch\i386\kernel\I
rq.c
b:表示静态结构体
比如上面例子中的root_irq_dir,在原码中的定义是:
static struct proc_dir_entry * root_irq_dir; //arch\i386\kernel\I
rq.c
D:表示已经定义过初值的变量
比如上面例子中的kstack_depth_to_print,在原码中的定义是:
int kstack_depth_to_print = 24; //arch\i386\kernel、Traps
.c
d:表示已经定义了初值的变量/数组
R:表示定义的常量[全局]数组