mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-12 07:49:17 +00:00
QoL and bug fixes
This commit is contained in:
@ -172,7 +172,7 @@ namespace Execute
|
||||
if (ELFGetDynamicTag(ElfFile, DT_TEXTREL))
|
||||
{
|
||||
fixme("Text relocation is not(?) tested yet!");
|
||||
MemoryImage = (uint8_t *)mem->RequestPages(TO_PAGES(Length), true);
|
||||
MemoryImage = (uint8_t *)mem->RequestPages(TO_PAGES(Length + 1), true);
|
||||
memset(MemoryImage, 0, Length);
|
||||
return {MemoryImage, 0x0};
|
||||
}
|
||||
@ -196,14 +196,14 @@ namespace Execute
|
||||
if (ItrPhdr.p_type == PT_LOAD && ItrPhdr.p_vaddr == 0)
|
||||
{
|
||||
debug("p_vaddr is 0, allocating %ld pages for image", TO_PAGES(Length));
|
||||
MemoryImage = mem->RequestPages(TO_PAGES(Length), true);
|
||||
MemoryImage = mem->RequestPages(TO_PAGES(Length + 1), true);
|
||||
memset(MemoryImage, 0, Length);
|
||||
return {MemoryImage, (void *)FirstProgramHeaderVirtualAddress};
|
||||
}
|
||||
}
|
||||
|
||||
debug("Allocating %ld pages for image", TO_PAGES(Length));
|
||||
MemoryImage = mem->RequestPages(TO_PAGES(Length));
|
||||
MemoryImage = mem->RequestPages(TO_PAGES(Length + 1));
|
||||
memset(MemoryImage, 0, Length);
|
||||
|
||||
if (FirstProgramHeaderVirtualAddress != 0)
|
||||
|
Reference in New Issue
Block a user