Compare commits

..

2 commits

Author SHA1 Message Date
mintsuki
bc16968387
Merge aae8a3c2e0 into b7d5f81b35 2024-09-01 02:51:02 +02:00
mintsuki
aae8a3c2e0 Update Zealbooter build system from Limine template 2024-09-01 02:50:19 +02:00
2 changed files with 9 additions and 23 deletions

View file

@ -27,15 +27,6 @@ $(call USER_VARIABLE,KNASMFLAGS,-F dwarf -g)
# User controllable linker flags. We set none by default. # User controllable linker flags. We set none by default.
$(call USER_VARIABLE,KLDFLAGS,) $(call USER_VARIABLE,KLDFLAGS,)
# Check if KCC is Clang.
override KCC_IS_CLANG := $(shell ! $(KCC) --version 2>/dev/null | grep 'clang' >/dev/null 2>&1; echo $$?)
# If the C compiler is Clang, set the target as needed.
ifeq ($(KCC_IS_CLANG),1)
override KCC += \
-target x86_64-unknown-none
endif
# Internal C flags that should not be changed by the user. # Internal C flags that should not be changed by the user.
override KCFLAGS += \ override KCFLAGS += \
-Wall \ -Wall \

View file

@ -9,7 +9,6 @@ ENTRY(kmain)
/* process. */ /* process. */
PHDRS PHDRS
{ {
requests PT_LOAD;
text PT_LOAD; text PT_LOAD;
rodata PT_LOAD; rodata PT_LOAD;
data PT_LOAD; data PT_LOAD;
@ -23,16 +22,6 @@ SECTIONS
/* that is the beginning of the region. */ /* that is the beginning of the region. */
. = 0xffffffff80000000; . = 0xffffffff80000000;
/* Define a section to contain the Limine requests and assign it to its own PHDR */
.requests : {
KEEP(*(.requests_start_marker))
KEEP(*(.requests))
KEEP(*(.requests_end_marker))
} :requests
/* Move to the next memory page for .text */
. = ALIGN(CONSTANT(MAXPAGESIZE));
.text : { .text : {
*(.text .text.*) *(.text .text.*)
} :text } :text
@ -49,6 +38,12 @@ SECTIONS
.data : { .data : {
*(.data .data.*) *(.data .data.*)
/* Place the sections that contain the Limine requests as part of the .data */
/* output section. */
KEEP(*(.requests_start_marker))
KEEP(*(.requests))
KEEP(*(.requests_end_marker))
} :data } :data
/* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */ /* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */