Skip to content

Commit d01b1c0

Browse files
committed
Switch to 32 bit memsz
This is safe to do because there is no virtual memory mapping larger than 2G to begin with
1 parent 6e03a9a commit d01b1c0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

elf_load.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ do_phdr:
2626
mov esi, [rdx + phdr_offset]
2727
add esi, ebx
2828

29-
mov rax, [rdx + phdr_memsz]
29+
mov eax, [rdx + phdr_memsz]
3030
mov ecx, [rdx + phdr_filesz]
31-
sub rax, rcx
31+
sub eax, ecx
3232
rep movsb
3333

34-
xchg rax, rcx
34+
xchg eax, ecx
3535
rep stosb
3636

3737
next_phdr:

0 commit comments

Comments
 (0)