荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: cycker (TryToDoEverythingOnLinux), 信区: Linux
标  题: Re: /boot/System.map起甚么作用?(转寄)[转载]
发信站: 荔园晨风BBS站 (Sun Jun  8 12:49:27 2003), 站内信件

【 以下文字转载自 cycker 的信箱 】
【 原文由 cycker(TryToDoEvevythingOnLinux) 所发表 】
发信人: hellguard (小四), 信区: Linux
标  题: Re: /boot/System.map起甚么作用?
发信站: BBS 水木清华站 (Mon Oct  8 20:02:27 2001)

标题: /boot/system.map是干什么的

This file is only needed during compilation for resolving those
kernel symbols. The running systems has no need for that file
Some LKMs use this file to hack system, they do as following :
(1) lookup System.map for the needed kernel symbol
(2) take the address they found
(3) modify the kernel symbol (structure, function, or whatever)

: 那么为什么在升级内核之后启动时会报告System.map的版本不对呢

kernel和lilo对System.map都不感兴趣,只有一个东东要用到System.map,
那就是klogd。
klogd用System.map把oop消息从1进制的形式转换成offset + symbol的形式,
以方便调试。
在系统启动时看到System.map版本号不同的消息,就是从klogd来的。

你可以这样试一下:
把/etc/rc.d/rc2.d/S30syslog改成s30syslog,不让它在系统启动的时候运行,
再看有没有System.map版本号不同的消息出现。

gaia:

ps 命令也需要它,当用ps的 "l" 选项察看进程正在用哪个system call时
(那个WCHAN)

To produce the WCHAN field, ps needs to read the System.map file
created when the kernel is compiled. The search path is:
$PS_SYSTEM_MAP
/boot/System.map-`uname -r`
/boot/Sysem.map
/lib/modules/`uname -r`/System.map
/usr/src/linux/System.map
/System.map

【 在 genocide (Feifeifly) 的大作中提到: 】
: 谢谢,侠哥


--

            也许有一天,他再从海上蓬蓬的雨点中升起,
            飞向西来,再形成一道江流,再冲倒两旁的石壁,
            再来寻夹岸的桃花。然而,我不敢说来生,也不敢信来生......


※ 来源:·BBS 水木清华站 smth.org·[FROM: 166.111.4.19]
--
※ 转载:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.36.220]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店