mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-28 19:33:09 +03:00
elf: Fix issue where KASLR was applied to non reloc executables
This commit is contained in:
parent
fe00a3c45d
commit
82eb809111
@ -486,7 +486,7 @@ bool elf64_load(uint8_t *elf, uint64_t *entry_point, uint64_t *_slide, uint32_t
|
||||
}
|
||||
|
||||
again:
|
||||
if (kaslr) {
|
||||
if (*is_reloc && kaslr) {
|
||||
slide = rand32() & ~(max_align - 1);
|
||||
|
||||
if ((*virtual_base - FIXED_HIGHER_HALF_OFFSET_64) + slide + image_size >= 0x80000000) {
|
||||
|
Loading…
Reference in New Issue
Block a user