|
在 grub4dos 的 builtins.c 文件里,有相关的一段语句:
if (*end_signature == 0xBCBAA7BA03051805ULL) //hotkey
{
if (*(unsigned long long *)(program + prog_len - 0x20) == 0x646E655F6E69616D) /* main_end New Version*/
{
char * tmp1;
char * program1;
unsigned long *bss_end = (unsigned long *)(program + prog_len - 0x24);
if (prog_len != *bss_end){
grub_free(tmp);
prog_len = *bss_end;
tmp1 = (char *)grub_malloc(prog_len + 4096 + 16 + psp_len);
if (tmp1 == NULL)
{
goto fail;
}
program1 = (char *)((int)(tmp1 + 4095) & ~4095); /* 4K align the program */
if (tmp1 != tmp)
{
grub_memmove (program1, program, (unsigned long)filemax);
program = program1;
tmp = tmp1;
}
psp = (char *)((int)(program + prog_len + 16) & ~0x0F);
}
} else {//the old program
char *program1;
printf_warning ("\nWarning! The program is outdated!\n");
psp = (char *)grub_malloc(prog_len + 4096 + 16 + psp_len);
grub_free(tmp);
if (psp == NULL)
{
goto fail;
}
program1 = psp + psp_len;
grub_memmove (program1, program, prog_len);
program = program1;
tmp = psp;
}
}
看来是与热键有关。
0xBCBAA7BA03051805ULL 是热键文件结束签名。
0x646E655F6E69616D 这个没有查到,grub4dos,hotkey,fat 文件里都没有找到。
看代码,只是提出警告,并没有退出程序,而是进行了有效的处理。 |
|