Files
ladybird/Kernel/Prekernel/Arch/aarch64/linker.ld
Nico Weber d0c1db5efc Kernel: Zero out .bss contents on aarch64
After building and running

     objcopy -O binary Build/aarch64/Kernel/Prekernel/Prekernel \
                       /media/sdcard/kernel8.img

things start booting on an actual RPi4 :^)

(Assuming the sdcard contains RPi firmware, an empty config.txt,
and no other kernel*.img files).
2021-09-30 15:38:43 +01:00

39 lines
542 B
Plaintext

ENTRY(start)
PHDRS
{
text PT_LOAD ;
data PT_LOAD ;
bss PT_LOAD ;
}
SECTIONS
{
. = 0x00080000;
.text ALIGN(4K) : AT (ADDR(.text))
{
*(.text.first)
*(.text*)
} :text
.rodata ALIGN(4K) : AT (ADDR(.rodata))
{
*(.rodata*)
} :data
.data ALIGN(4K) : AT (ADDR(.data))
{
*(.data*)
} :data
.bss ALIGN(4K) (NOLOAD) : AT (ADDR(.bss))
{
start_of_bss = .;
*(.bss)
end_of_bss = .;
} :bss
}
size_of_bss_divided_by_8 = (end_of_bss - start_of_bss) / 8;