> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 16:51:56 up 6 days, 11:57, 1 user, load average: 0.59, 0.52, 0.44
This commit is contained in:
@ -18,8 +18,8 @@ static uintptr_t loader(PCB *pcb, const char *filename) {
|
||||
ret = ramdisk_read(&ehdr, 0, sizeof(ehdr));
|
||||
assert(ret == sizeof(ehdr));
|
||||
// assert(ehdr.e_ident[0] == 0x7f && ehdr.e_ident[1] == 'E' && ehdr.e_ident[2] == 'L' && ehdr.e_ident[3] == 'F');
|
||||
// assert(memcpy(ehdr.e_ident, ELFMAG, SELFMAG) == 0);
|
||||
assert(*(uint32_t *)ehdr.e_ident == 0x7f454746);
|
||||
assert(memcpy(ehdr.e_ident, ELFMAG, SELFMAG) == 0);
|
||||
//assert(*(uint32_t *)ehdr.e_ident == 0x7f454746);
|
||||
|
||||
Elf_Phdr phdr[ehdr.e_phnum];
|
||||
assert(ehdr.e_phentsize % sizeof(Elf_Phdr) == ehdr.e_phnum);
|
||||
|
Reference in New Issue
Block a user