...
This commit is contained in:
15
.vscode/c_cpp_properties.json
vendored
15
.vscode/c_cpp_properties.json
vendored
@@ -4,14 +4,25 @@
|
|||||||
{
|
{
|
||||||
"name": "kernel",
|
"name": "kernel",
|
||||||
"defines": [
|
"defines": [
|
||||||
"DEBUG"
|
"DEBUG",
|
||||||
|
"true=1", // https://github.com/microsoft/vscode-cpptools/issues/10696
|
||||||
|
"false=0" // https://github.com/microsoft/vscode-cpptools/issues/10696
|
||||||
],
|
],
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"src/lib"
|
"src/lib"
|
||||||
],
|
],
|
||||||
"intelliSenseMode": "linux-gcc-x64",
|
"intelliSenseMode": "linux-gcc-x64",
|
||||||
"compilerPath": "/usr/bin/x86_64-elf-gcc",
|
"compilerPath": "/usr/bin/x86_64-elf-gcc",
|
||||||
"cStandard": "c23"
|
"cStandard": "c23",
|
||||||
|
"compilerArgs": [
|
||||||
|
"-m64",
|
||||||
|
"-ffreestanding",
|
||||||
|
"-nostdinc",
|
||||||
|
"-nostdlib",
|
||||||
|
"-Wall",
|
||||||
|
"-Wextra",
|
||||||
|
"-Wshadow"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
11
linker.ld
11
linker.ld
@@ -3,29 +3,28 @@ ENTRY(_start)
|
|||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = 2M;
|
. = 2M;
|
||||||
kernel_start = .;
|
|
||||||
|
|
||||||
.text BLOCK(4K) : ALIGN(4K)
|
.text :
|
||||||
{
|
{
|
||||||
*(.multiboot)
|
*(.multiboot)
|
||||||
*(.text)
|
*(.text)
|
||||||
}
|
}
|
||||||
|
|
||||||
.rodata BLOCK(4K) : ALIGN(4K)
|
.rodata :
|
||||||
{
|
{
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
}
|
}
|
||||||
|
|
||||||
.data BLOCK(4K) : ALIGN(4K)
|
.data :
|
||||||
{
|
{
|
||||||
*(.data)
|
*(.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
.bss BLOCK(4K) : ALIGN(4K)
|
.bss :
|
||||||
{
|
{
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel_end = .;
|
kernel_end = .;
|
||||||
}
|
}
|
||||||
2
makefile
2
makefile
@@ -8,7 +8,7 @@ LDFLAGS = -g
|
|||||||
ASFLAGS = -g -F dwarf
|
ASFLAGS = -g -F dwarf
|
||||||
|
|
||||||
# Do not modify
|
# Do not modify
|
||||||
CFLAGS += -m64 -ffreestanding -nostdinc -nostdlib -fno-builtin -Wall -Wextra -Wshadow -std=c23 -I src/lib
|
CFLAGS += -m64 -ffreestanding -nostdinc -nostdlib -Wall -Wextra -Wshadow -std=c23 -I src/lib
|
||||||
LDFLAGS +=
|
LDFLAGS +=
|
||||||
ASFLAGS += -f elf64
|
ASFLAGS += -f elf64
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user