boot: zero bss after jump to C entry point
This commit is contained in:
parent
0433c683e7
commit
38691a2f01
@ -110,7 +110,10 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
|
||||
ST = SystemTable;
|
||||
ImageHandleIn = ImageHandle;
|
||||
#else
|
||||
extern char _bss_start[];
|
||||
extern char _bss_end[];
|
||||
int kmain() {
|
||||
memset(&_bss_start,0,(uintptr_t)&_bss_end-(uintptr_t)&_bss_start);
|
||||
#endif
|
||||
|
||||
BOOT_OPTION(_debug, 0, "Debug output",
|
||||
|
@ -28,10 +28,12 @@ SECTIONS
|
||||
|
||||
.bss BLOCK(1) : ALIGN(1)
|
||||
{
|
||||
PROVIDE(_bss_start = .);
|
||||
bss = .;
|
||||
*(COMMON)
|
||||
*(.bss)
|
||||
*(.stack)
|
||||
PROVIDE(_bss_end = .);
|
||||
}
|
||||
|
||||
end = .;
|
||||
|
Loading…
Reference in New Issue
Block a user