Chinaunix首页 | 论坛 | 博客
  • 博客访问: 584592
  • 博文数量: 213
  • 博客积分: 6789
  • 博客等级: 准将
  • 技术积分: 1947
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-01 17:11
文章分类

全部博文(213)

文章存档

2012年(9)

2011年(62)

2010年(99)

2009年(43)

分类: LINUX

2010-07-28 11:41:11

每次编译内核时候都会生成一个文件System.map并保存在源代码目录下
chechunli@chechunli-desktop:boot $ pwd
/boot
chechunli@chechunli-desktop:boot $ uname -a
Linux chechunli-desktop 2.6.24-28-generic #1 SMP Fri Jun 18 12:02:15 UTC 2010 i686 GNU/Linux
chechunli@chechunli-desktop:boot $ cat System.map-2.6.24-28-generic 

00000400 A __kernel_vsyscall
00000410 A SYSENTER_RETURN
00000420 A __kernel_sigreturn
00000440 A __kernel_rt_sigreturn
00100000 A phys_startup_32
c0100000 T _text                   代码段开始
c0100000 T startup_32
c0100084 t bad_subarch
c0100084 W lguest_entry
c0100084 W xen_entry
.....
c0320bc0 T get_insn_slot
c0320cc0 T __kprobes_text_end
c0320fd5 t iret_exc
c032189a T _etext                  代码段结束,数据段开始
c03218a0 R __start___ex_table
c0322628 T __start_notes
c0322628 R __stop___ex_table 
.....
c041cdbc d secpath_cachep
c041cdc0 D sysctl_unix_max_dgram_qlen
c041cdc4 D _edata       数据段结束,包含初始化为0的所有静态全局变量的BSS段的开始
c041e000 D init_thread_union
c0420000 R __smp_locks
c0422ffc R __smp_locks_end
.....
c04f5a40 b idle_timer
c04f5a70 b wireless_nlevent_queue
c04f5a80 B __bss_stop
c04f5a80 B _end                    结束
c04f6000 B pg0


_text和_etext是代码段的起始和结束地址,包含了编译后的内核代码。
数据段位于_etext和_edata之间,保存了大部分内核变量。
初始化数据在内核启动过程结束后不再需要(bss段,未初始化数据或者初始化为0的数据)保存在最后一段,从_edata到_end。在内核初始化完成后,其中的大部分数据都可以从内存中删除。
上述地址值都偏移了0xC0000000,这是在用户和内核地址空间之间采用标准的3:1划分时,内核的起始地址。该地址是虚拟地址。

小写字母表示局部; 大写字母表示全局(外部). 
The symbol's value is absolute, and will not be changed by further linking.

The symbol is in the uninitialized data section (known as BSS).

The symbol is common. Common symbols are uninitialized data. When linking, multiple common symbols may appear with the same name. If the symbol is defined anywhere, the common symbols are treated as undefined references. For more details on common symbols, see the discussion of -warn-common in Linker options.

The symbol is in the initialized data section.

The symbol is in an initialized data section for small objects. Some object file formats permit more efficient access to small data objects, such as a global int variable as opposed to a large global array.

The symbol is an indirect reference to another symbol. This is a GNU extension to the a.out object file format which is rarely used.

The symbol is a debugging symbol.

The symbol is in a read only data section.

The symbol is in an uninitialized data section for small objects.

The symbol is in the text (code) section.

The symbol is undefined.

The symbol is a weak object. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the weak symbol becomes zero with no error.

The symbol is a weak symbol that has not been specifically tagged as a weak object symbol. When a weak defined symbol is linked with a normal defined symbol, the normal defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the weak symbol becomes zero with no error.

The symbol is a stabs symbol in an a.out object file. In this case, the next values printed are the stabs other field, the stabs desc field, and the stab type. Stabs symbols are used to hold debugging information. For more information, see Stabs.

The symbol type is unknown, or object file format specific.

阅读(634) | 评论(0) | 转发(0) |
0

上一篇:查看内存大小

下一篇:内存管理

给主人留下些什么吧!~~