【发布时间】:2021-10-03 13:17:32
【问题描述】:
根据https://ineclabs.com/image-zimage-uimage-vmlinuz-linux-kernel/
Image: The generic Linux kernel binary image file.
我有一个使用make Image 编译的ARM64 内核,它被Linux 识别为Windows 可执行文件。至少它得到了窗口图标。
在 Cutter 上,我打开并得到了 pe64 的认可
根据Documentation/arm64/booting.rst,这是解压时的内核头
======aarch64 kernel header========
u32 code0; /* Executable code */
u32 code1; /* Executable code */
u64 text_offset; /* Image load offset, little endian */
u64 image_size; /* Effective Image size, little endian */
u64 flags; /* kernel flags, little endian */
u64 res2 = 0; /* reserved */
u64 res3 = 0; /* reserved */
u64 res4 = 0; /* reserved */
u32 magic = 0x644d5241; /* Magic number, little endian, "ARM\x64" */
u32 res5; /* reserved (used for PE COFF offset) */
====================================
为了让它被识别为 PE64,前 2 个字节应该是 4D 5A,但我没有在这个内核头文件中看到这种情况
【问题讨论】:
标签: linux windows kernel portable-executable