summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/link.ld14
-rw-r--r--src/kernel/main.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/src/kernel/link.ld b/src/kernel/link.ld
index 64dd0be..aeb8974 100644
--- a/src/kernel/link.ld
+++ b/src/kernel/link.ld
@@ -1,11 +1,13 @@
-OUTPUT_FORMAT(binary)
+MEMORY {
+ kload : ORIGIN = 0x01000000, LENGTH = 0x01000000
+}
+
SECTIONS {
. = 0x01000000;
.text : {
- main = .;
+ _start = .;
*(.text)
- }
- .rodata : { *(.rodata) }
- .data : { *(.data) }
- .bss : { *(.bss) }
+ } >kload
+ .rodata : { *(.rodata) } >kload
+ .data : { *(.data) *(.bss) } >kload
} \ No newline at end of file
diff --git a/src/kernel/main.c b/src/kernel/main.c
index 6a8630b..9ad9d1c 100644
--- a/src/kernel/main.c
+++ b/src/kernel/main.c
@@ -23,7 +23,7 @@ OF THIS SOFTWARE.
#include "proc.h"
#include "misc.h"
-void main(void) {
+void _start(void) {
*(uint16_t *)0x0000200e = 0x0000;
*(uint32_t *)0x0000050c = (uint32_t)allocate_pages(16 * sizeof(struct file_handle_info), 2);