system.map文件详解

有时system.map文件可以帮助我们理解内核编译,它记录了所有代码的运行地址。对于系统的oop消息、或者通过gdb的调试消息,都需要根据该对照表,将内核熟悉的函数地址转化为用户熟悉的函数名称,便于用户进行故障定位、运行监控。

system.map内容格式为:线性地址 类型 符号

符号类型.

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

A

The symbol‘s value is absolute, and will not be changed by further linking.

B

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

C

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.

D

The symbol is in the initialized data section.

G

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.

I

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.

N

The symbol is a debugging symbol.

R

The symbol is in a read only data section.

S

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

T

The symbol is in the text (code) section.

U

The symbol is undefined.

V

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.

W

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.

符号类型:大写为全局符号,小写为局部符号

A:该符号的值是不能改变的,等于const

B:该符号来自于未初始化代码段bss段

C: 该符号是通用的,通用的符号指未初始化的数据。当链接时,多个通用符号可能对应一个名称,如果该符号在某一个位置定义,这个通用符号被当做未定义的引用。不明白,内核中也没有该类型的符号

D: 该符号位于初始化的数据段

G: 位于初始化数据段,专门对应小的数据对象,比如global int x,对应的大数据对象为 数组类型等

I: 到其他符号的间接引用,是对于a.out文件的GNU扩展,使用非常少

N:调试符号

R:只读代码段的符号

S:BSS段(未初始化数据段)的小对象符号

T:代码段符号,全局函数,t为局部函数

U:未定义的符号

V:该符号是一个weak object,当其连接到为定义的对象上上,该符号的值变为0

W: 类似于V

—: 该符号是a.out文件中的一个stabs symbol,获取调试信息

?: 未知类型的符号

实例:

具体内容如下:
00100000 A phys_startup_32
c0100000 T startup_32
c0100000 A _text                             注:表示内核代码第一个字节的地址
c01000c6 t checkCPUtype
c0100147 t is486
c010014e t is386
c0100199 t L6
c010019b t check_x87
c01001c2 t setup_idt
c01001df t rp_sidt
c01001ec t ignore_int
c0100220 t rest_init
c0100220 T stext
c0100220 T _stext
c0100252 t do_pre_smp_initcalls
c0100257 t run_init_process
c0100283 t init
c01003a8 t try_name
c0100529 T name_to_dev_t
c0100790 t calibrate_delay_direct

...

c02f95d7 T register_kretprobe
c02f96cd T unregister_kretprobe
c02f9760 t .text.lock.kprobes
c02f97b0 T __kprobes_text_end
c02f9abe t iret_exc
c02fa1af A _etext                              注:内核代码结束的位置,之后为内核初始化的数据
c02fa1b0 A __start___ex_table
c02facc0 A __stop___ex_table
c02fb000 r __func__.12
c02fb000 A __start_rodata
c02fb00c r __func__.13
c02fb020 r __func__.2
c02fb02c r __func__.3
c02fb040 R linux_banner
c02fb0bb r __func__.0
c02fb0c7 r __func__.1
c02fb0e0 r __func__.0
c02fb0ec r __func__.1
c02fb100 r border
c02fb160 r cplens

...

c03e1b08 D ip_statistics
c03e1b10 D tcp_statistics
c03e1b18 D udp_statistics
c03e1b20 D icmp_statistics
c03e1b28 D net_statistics
c03e1b30 d fn_hash_kmem
c03e1b34 d fn_alias_kmem
c03e1b38 d xfrm_dst_cache
c03e1b3c d secpath_cachep
c03e1b40 A _edata                       注:内核初始化数据结束,之后为未初始化数据
c03e2000 D init_thread_union
c03e4000 A __init_begin
c03e4000 t no_halt
c03e4000 T _sinittext
c03e400d t mca_pentium
c03e401d t no_387
c03e4033 t check_fpu
...

c043a058 b pfkey_table
c043a05c b pfkey_table_lock
c043a05c b pfkey_table_users
c043a060 b pfkey_socks_nr
c043a064 b acqseq.4
c043a068 b acqseq_lock.5
c043a068 A __bss_stop
c043a068 A _end                         注:内核未初始化数据结束
c043b000 A pg0
ffffe400 A __kernel_vsyscall
ffffe410 A SYSENTER_RETURN
ffffe420 A __kernel_sigreturn
ffffe440 A __kernel_rt_sigreturn

参考文献:

http://www.blogbus.com/wanderer-zjhit-logs/172382425.html

http://forum.eepw.com.cn/thread/128712/1/

时间: 2024-11-10 14:10:32

system.map文件详解的相关文章

Linux-apache httd.conf文件详解

Linux-apache httd.conf文件详解 # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.2/> for detailed information. # In particular

史上最全的maven的pom.xml文件详解

史上最全的maven的pom.xml文件详解 http://www.cnblogs.com/hafiz/p/5360195.html <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h

POM文件详解(1)

POM文件详解 <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> 1      Parent坐标 <

C语言中的system函数参数详解

http://blog.csdn.net/pipisorry/article/details/33024727 函数名: system 功   能: 发出一个DOS命令 用   法: int system(char *command); system函数已经被收录在标准c库中,可以直接调用 system()函数用于向操作系统传递控制台命令行,以WINDOWS系统为例,通过system()函数执行命令和在DOS窗口中执行命令的效果是一样的,所以只要在运行窗口中可以使用的命令都可以用SYSTEM()

hibernate 对象关系映射文件详解

POJO 类和数据库的映射文件*.hbm.xml POJO类和关系数据库之间的映射可以用一个XML文档来定义. 映射文件的扩展名为.hbm.xml 在运行时Hibernate将根据这个映射文件来生成各种SQL语句 通过POJO类的数据库映射文件,Hibernate可以理解持久化类和数据表之间的对应关系,也可以理解持久化类属性与数据库表列之间的对应关系 映射文件说明 hibernate-mapping 类层次:class 主键:id 基本类型:property 实体引用类: many-to-one

003--映射文件详解

映射文件详解 2.映射文件2.1.example<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE sqlMapPUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN""http://www.ibatis.com/dtd/sql-map-2.dtd"><sqlMap namespace="User">

jni.h头文件详解(二)

一:struct JNINativeInterface_{} 结构体的作用:它有点像我们char字符驱动的 file_ops结构体,它定义各种函数对在(jni.h头文件详解一)中定义的各种数据的操作函数集体. 二:它包含那些针对Java中类和对象的相关操作呢如下图. 三:下面我们讲详细介绍14个部分方法的用法和解析 3.1.版本信息操作函数. 一.GetVersion jint (JNICALL *GetVersion)(JNIEnv *env) --模块信息:该模块主要针对的JNI接口的版本信

manifest文件详解

<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.exe.phone" <?xml version="1.0" encoding="utf-8"?> <manife

SUBLIME TEXT 2 设置文件详解

SUBLIME TEXT 2 设置文件详解 Preferences.sublime-settings文件: // While you can edit this file, it’s best to put your changes in // “User/Preferences.sublime-settings”, which overrides the settings in here. // // Settings may also be placed in file type speci