Chinaunix首页 | 论坛 | 博客
  • 博客访问: 192380
  • 博文数量: 41
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 131
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-03 20:39
文章分类

全部博文(41)

文章存档

2019年(2)

2018年(1)

2014年(19)

2013年(19)

分类: LINUX

2013-12-26 15:26:26

System.map 符号映射表:线性地址 类型 符号(System.map是编译内核以后所创建的)
c0100000        A     _text                注:表示内核代码第一个字节的地址
c02fa1af          A     _etext              注:内核代码结束的位置,之后为内核初始化的数据
c03e1b40        A     _edata             注:内核初始化数据结束,之后为未初始化数据
c043a068        A     _end                注:内核未初始化数据结束


_text,_etext,_edata,_end Linux源代码中没有定义,是编译内核时产生的。

符号类型

小写字母表示局部; 大写字母表示全局(外部). 

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. 
 

# info binutils查看更详细的信息


      Linux用klogd(内核日志后台程序)后台程序,会截取内核oops并且使用syslogd将其记录下来,并将某些像c0100000的信息转换成我们可以识别和使用的信息。也就是,klogd是一个内核消息记录器(logger),它可以进行名字-地址之间的解析。它可以将整个系统的消息记录下来,通常是使用syslogd记录器。为了进行名字-地址解析,klogd就要用到System.map文件。

# strace -f /sbin/klogd | grep 'System.map'
open("/boot/System.map-2.4.18", O_RDONLY|O_LARGEFILE) = 2



阅读(2399) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~