用 vmlinuz 得到 vmlinux 逆转化
分类: linux内核 2012-05-03 16:10 119人阅读 评论(0) 收藏 举报
http://www.linuxquestions.org/questions/programming-9/convert-vmlinuz-to-vmlinux-530085/
The vmlinuz isn't just the compressed kernel, it's complete bootable image including the decompressor. To get just the image search for the GZ signature - 1f 8b 08 00. Now i'm sure there are scripts for it somewhere, but you can do it old-fashioned way - in my case:
> od -A d -t x1 vmlinuz | grep '1f 8b 08 00'
0024576 24 26 27 00 ae 21 16 00 1f 8b 08 00 7f 2f 6b 45
so the image begins at 24576+8 => 24584 . Then just copy the image from the point and decompress it -
>dd if=vmlinuz bs=1 skip=24584 | zcat > vmlinux
1450414+0 records in
1450414+0 records out
1450414 bytes (1.5 MB) copied, 6.78127 s, 214 kB/s
分类: linux内核 2012-05-03 16:10 119人阅读 评论(0) 收藏 举报
http://www.linuxquestions.org/questions/programming-9/convert-vmlinuz-to-vmlinux-530085/
The vmlinuz isn't just the compressed kernel, it's complete bootable image including the decompressor. To get just the image search for the GZ signature - 1f 8b 08 00. Now i'm sure there are scripts for it somewhere, but you can do it old-fashioned way - in my case:
> od -A d -t x1 vmlinuz | grep '1f 8b 08 00'
0024576 24 26 27 00 ae 21 16 00 1f 8b 08 00 7f 2f 6b 45
so the image begins at 24576+8 => 24584 . Then just copy the image from the point and decompress it -
>dd if=vmlinuz bs=1 skip=24584 | zcat > vmlinux
1450414+0 records in
1450414+0 records out
1450414 bytes (1.5 MB) copied, 6.78127 s, 214 kB/s
本文介绍如何从vmlinuz文件中提取并转换为vmlinux文件的过程。通过搜索GZ签名定位压缩内核的起始位置,并利用dd和zcat命令完成内核的解压。

被折叠的 条评论
为什么被折叠?



