Stop relying on the Jailhouse loader to clear call memory and perform
the required bss initialization to zero on our own.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
start64:
mov $stack_top,%rsp
+ xor %rax,%rax
+ mov $bss_start,%rdi
+ mov $bss_qwords,%rcx
+ rep stosq
+
mov $inmate_main,%rax
jmpq *%rax
. = ALIGN(16);
}
- /* 32-bit sections */
+ /* 32/64-bit sections */
. = 0xe0000;
stack_top = .;
- .bss : { *(.bss) }
+ bss_start = .;
+ .bss : {
+ *(.bss)
+ . = ALIGN(8);
+ }
+ bss_qwords = SIZEOF(.bss) / 8;
. = 0xf0000 + SIZEOF(.startup);
.text : AT (ADDR(.text) & 0xffff) {