1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 17:37:47 +00:00

Kernel: Adjust aarch64 linker script

- .text now starts at 0x80000, where an actual (non-qemu) RPi expects
- use magic section name ".text.first" to make sure the linker script
  puts the kernel entry point at the start of the .text section
- remove a few things from the x86 linker script that aren't needed
  for aarch64 (yet?)
This commit is contained in:
Nico Weber 2021-09-26 21:33:21 -04:00 committed by Linus Groh
parent cbdf4b575d
commit 4c876e88e0
3 changed files with 5 additions and 23 deletions

View file

@ -4,19 +4,13 @@ set(SOURCES
)
if ("${SERENITY_ARCH}" STREQUAL "aarch64")
set(SOURCES
# This has to be first, so that the entry point is at the start of the image.
# Needed because:
# - execution starts at the start of the image
# - the stack pointer currently starts before the start symbol, so if the start symbol isn't the first symbol, the stack will clobber arbitrary code
# FIXME: Use an aarch64-specific linker script instead.
Arch/aarch64/boot.S
${SOURCES}
Arch/aarch64/GPIO.cpp
Arch/aarch64/Mailbox.cpp
Arch/aarch64/MainIdRegister.cpp
Arch/aarch64/MMIO.cpp
Arch/aarch64/UART.cpp
Arch/aarch64/boot.S
Arch/aarch64/init.cpp
)
else()