some minor fixes to kernel

This commit is contained in:
Gregory Kenneth Bowne 2023-07-17 22:35:29 -07:00
parent 7cc909d389
commit 4b75ea421d
6 changed files with 34 additions and 29 deletions

BIN
kernel

Binary file not shown.

View File

@ -1,21 +1,8 @@
ENTRY(main) ENTRY(boot)
SECTIONS {
SECTIONS {
. = 0x7c00; . = 0x7c00;
.text : { .text : {
*(.text) *(.text)
} }
/* Add other sections as needed */
.rodata : {
*(.rodata)
} }
.data : {
*(.data)
}
.bss : {
*(.bss)
}
}

BIN
src/kernel/kernel.bin Executable file

Binary file not shown.

21
src/kernel/linker.ld Normal file
View File

@ -0,0 +1,21 @@
ENTRY(kernel_main)
SECTIONS {
. = 0x100000;
.text : {
*(.text)
}
.rodata : {
*(.rodata)
}
.data : {
*(.data)
}
.bss : {
*(.bss)
}
}

5
src/kernel/print.c Normal file
View File

@ -0,0 +1,5 @@
#include "kernel.h"
void print_string(const char* str) {
// Your code to print the string to the screen goes here
}

View File

@ -1,8 +0,0 @@
ENTRY(boot)
SECTIONS {
. = 0x7c00;
.text : {
*(.text)
}
/* Add other sections as needed */
}