1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-16 00:00:06 +01:00

determine image size at runtime

- because the image could be larger as the file size
- e.g. the file doesn't include BSS
This commit is contained in:
Stefan Lankes 2015-09-13 18:06:20 +02:00
parent be9ed3064d
commit 650d159213

View file

@ -95,6 +95,12 @@ start64:
mov fs, eax
mov gs, eax
; determine full image size
mov rax, kernel_end
sub rax, kernel_start
mov QWORD [image_size], rax
xor rax, rax
mov eax, DWORD [cpu_online]
cmp eax, 0
jne Lno_pml4_init