summaryrefslogtreecommitdiff
path: root/config/kernel.ld
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-21 16:44:27 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-21 16:44:27 -0400
commit93dc96687b9b0dc2ab9db26aa8dfb79aab96d01d (patch)
tree5f9949d767a2581a1415dc712dd4e953d1a7371d /config/kernel.ld
parentfmt, rename some fns (diff)
downloadcomus-93dc96687b9b0dc2ab9db26aa8dfb79aab96d01d.tar.gz
comus-93dc96687b9b0dc2ab9db26aa8dfb79aab96d01d.tar.bz2
comus-93dc96687b9b0dc2ab9db26aa8dfb79aab96d01d.zip
update linker scripts
Diffstat (limited to 'config/kernel.ld')
-rw-r--r--config/kernel.ld15
1 files changed, 11 insertions, 4 deletions
diff --git a/config/kernel.ld b/config/kernel.ld
index bcacf61..8ac23e8 100644
--- a/config/kernel.ld
+++ b/config/kernel.ld
@@ -1,5 +1,12 @@
ENTRY(_start)
+PHDRS
+{
+ text PT_LOAD;
+ rodata PT_LOAD;
+ data PT_LOAD;
+}
+
SECTIONS
{
. = 1M;
@@ -14,7 +21,7 @@ SECTIONS
*(.text)
*(.text.*)
text_end = .;
- }
+ } : text
. = ALIGN(0x1000);
@@ -23,7 +30,7 @@ SECTIONS
*(.rodata)
*(.rodata.*)
rodata_end = .;
- }
+ } : rodata
. = ALIGN(0x1000);
@@ -32,7 +39,7 @@ SECTIONS
*(.data)
*(.data.*)
data_end = .;
- }
+ } : data
. = ALIGN(0x1000);
@@ -42,7 +49,7 @@ SECTIONS
*(.bss)
*(.bss.*)
bss_end = .;
- }
+ } : data
kernel_end = .;