mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-03-17 05:25:04 +00:00
Compare commits
2 commits
fdb4b0313b
...
bc16968387
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bc16968387 | ||
![]() |
aae8a3c2e0 |
2 changed files with 9 additions and 23 deletions
zealbooter
|
@ -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 \
|
||||||
|
|
|
@ -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 */
|
||||||
|
|
Loading…
Reference in a new issue