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:
parent
be9ed3064d
commit
650d159213
1 changed files with 6 additions and 0 deletions
|
@ -95,6 +95,12 @@ start64:
|
||||||
mov fs, eax
|
mov fs, eax
|
||||||
mov gs, 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]
|
mov eax, DWORD [cpu_online]
|
||||||
cmp eax, 0
|
cmp eax, 0
|
||||||
jne Lno_pml4_init
|
jne Lno_pml4_init
|
||||||
|
|
Loading…
Add table
Reference in a new issue