Cleaned up ELF64 address handling.
* platform_allocate_elf_region() is removed, it is implemented in platform- independent code now (ELF*Class::AllocateRegion). For ELF64 it is now assumed that 64-bit addresses are mapped in the loader's 32-bit address space as (address - KERNEL_BASE_64BIT + KERNEL_BASE). * mapped_delta field from preloaded_*_image removed, now handled compile-time using the ELF*Class::Map method. * Also link the kernel with -z max-page-size=0x1000, removes the need for 2MB alignment on the data segment (not going to map the kernel with large pages for the time being).
This commit is contained in:
@@ -388,6 +388,7 @@ switch $(HAIKU_ARCH) {
|
||||
# code due to interrupts.
|
||||
HAIKU_KERNEL_CCFLAGS += -mcmodel=kernel -mno-red-zone ;
|
||||
HAIKU_KERNEL_C++FLAGS += -mcmodel=kernel -mno-red-zone ;
|
||||
HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ;
|
||||
|
||||
# Bootloader is 32-bit.
|
||||
HAIKU_BOOT_LINKFLAGS += -m elf_i386_haiku ;
|
||||
|
||||
Reference in New Issue
Block a user