问题描述
我想从vmlinuz的产生的System.map,导致大部分机器没有文件System.map.In事实上,vmlinuz的是COM pressed至vmlinuz或bzImage的。
这是任何工具或脚本可以做到这一点?
我试过:
DD如果=的/ boot / vmlinuz的跳跃=`grep的-a -b -o -m 1 -e $'\\ X1F \\ x8b \\ X08 \\ X00'的/ boot / vmlinuz的|切-d:-f 1` BS = 1 | ZCAT>的/ tmp / vmlinux的
据失败:
ZCAT:标准输入:不是gzip格式
32769 + 0记录
32768 + 0记录了
要提取内核映像pssed内核uncom $ P $,你可以使用提取物的vmlinux
在内核树从脚本脚本
目录(可至少在内核版本3.5)(如果你得到像
you need to replace $(mktemp /tmp/vmlinux-XXX)
by $(mktemp /tmp/vmlinux-XXXXXX)
in the script). The command is /path/to/kernel/tree/scripts/extract-vmlinux <kernel image> >vmlinux
.
If the extracted kernel binary contains symbol information, you should¹ be able to create the System.map
file using the mksysmap
script from the same subdirectory. The command here is NM=nm /path/to/kernel/tree/scripts/mksysmap vmlinux System.map
.
¹ The kernel images shipped with my distribution seem to be stripped, so the script was not able to get the symbols.
这篇关于从vmlinuz的或bzImage的vmlinux的提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!