arm: kernel link cleanup and fixes

* Removes several previous hacks, and makes kernel loading
  by our bootloader more reliable.
* Long list of "Couldn't find both text and data" errors
  no gone in our bootloader as it loads our kernel

Change-Id: Ic9f5ed44975d41fb22d7ab19536261432abe84ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3444
Reviewed-by: Alex von Gluck IV <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Fredrik Holmqvist
2020-11-30 22:08:32 +00:00
committed by Alex von Gluck IV
parent 64fc5a66b1
commit cb26d04e81
3 changed files with 33 additions and 52 deletions
+6 -13
View File
@@ -401,21 +401,14 @@ rule KernelArchitectureSetup architecture
switch $(cpu) {
case arm :
# Workaround for ld using 32k for alignment despite forcing it in the config...
# should definitely not be needed!
HAIKU_KERNEL_LINKFLAGS +=
-Wl,-z -Wl,max-page-size=0x1000
-Wl,-z -Wl,common-page-size=0x1000 ;
HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ;
HAIKU_KERNEL_ADDON_LINKFLAGS += -z max-page-size=0x1000 ;
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
case arm64 :
# Workaround for ld using 32k for alignment despite forcing it in the config...
# should definitely not be needed!
HAIKU_KERNEL_LINKFLAGS +=
-Wl,-z -Wl,max-page-size=0x1000
-Wl,-z -Wl,common-page-size=0x1000 ;
HAIKU_KERNEL_PIC_CCFLAGS = -fPIC ;
HAIKU_KERNEL_PIC_LINKFLAGS = -shared -fPIC ;
HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ;
HAIKU_KERNEL_ADDON_LINKFLAGS += -z max-page-size=0x1000 ;
HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ;
case ppc :
# Build a position independent PPC kernel. We need to be able to