summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-03-27 14:26:56 -0400
committerFreya Murphy <freya@freyacat.org>2025-03-27 14:26:56 -0400
commit8683b472a6a7513c4dc29517f3145384fed372f0 (patch)
treecd136f35d4db2e8b66d910fa4869859ba6655865
parentpull changes (diff)
downloadcomus-8683b472a6a7513c4dc29517f3145384fed372f0.tar.gz
comus-8683b472a6a7513c4dc29517f3145384fed372f0.tar.bz2
comus-8683b472a6a7513c4dc29517f3145384fed372f0.zip
move user to 0x30000, update kernel.ld
-rw-r--r--Makefile2
-rw-r--r--kernel/kernel.ld22
2 files changed, 19 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1283f3a..437b355 100644
--- a/Makefile
+++ b/Makefile
@@ -46,5 +46,5 @@ bin/user.img: build
bin/disk.img: build bin/boot.bin bin/user.img
cd bin && \
./BuildImage -d usb -o disk.img -b boot.bin \
- kernel 0x10000 user.img 0x40000
+ kernel 0x10000 user.img 0x30000
diff --git a/kernel/kernel.ld b/kernel/kernel.ld
index 2007432..3167327 100644
--- a/kernel/kernel.ld
+++ b/kernel/kernel.ld
@@ -25,15 +25,27 @@ SECTIONS
*(.rodata .rodata.* .gnu.linkonce.r.*)
}
+ /* Could put STABs here */
+ .stab : {
+ PROVIDE(__STAB_BEGIN__ = .);
+ *(.stab);
+ PROVIDE(__STAB_END__ = .);
+ }
+ .stabstr : {
+ PROVIDE(__STABSTR_BEGIN__ = .);
+ *(.stabstr);
+ PROVIDE(__STABSTR_END__ = .);
+ }
+
/* Align the data segment at the next page boundary */
- /* . = ALIGN(0x1000); */
+ . = ALIGN(0x1000);
PROVIDE(data = .);
PROVIDE(_data = .);
/* The data segment */
.data : {
- *(.data)
+ *(.data .data.*)
}
PROVIDE(edata = .);
@@ -45,13 +57,15 @@ SECTIONS
PROVIDE(__bss_start = .);
.bss : {
- *(.bss)
+ *(.bss .bss.*)
+ *(COMMON)
}
PROVIDE(end = .);
PROVIDE(_end = .);
/DISCARD/ : {
- *(.stab .stab_info .stabstr .eh_frame .note.GNU-stack .note.gnu.property .comment)
+ /* *(.stab .stab_info .stabstr) */
+ *(.eh_frame .note.GNU-stack .note.gnu.property .comment)
}
}