From 69cb97bb6f3ae30236df85ea2dc6d755e8b7016d Mon Sep 17 00:00:00 2001 From: captain-n3m0 Date: Mon, 15 May 2023 02:24:08 +0530 Subject: [PATCH] fixed some errors --- Kernel16F.ld | 16 ++++------------ makefile | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Kernel16F.ld b/Kernel16F.ld index 974ad76..1116646 100644 --- a/Kernel16F.ld +++ b/Kernel16F.ld @@ -1,33 +1,25 @@ ENTRY(_start) SECTIONS { - /* Text section */ + . = 0x1000; + .text : { *(.text) } - /* Read-only data section */ .rodata : { *(.rodata) } - /* Data section */ .data : { *(.data) } - /* BSS section */ .bss : { *(.bss) } - /* Stack section */ - .stack : { - /* Set the stack pointer to the end of the memory region */ - . = ORIGIN(memory) + LENGTH(memory); - *(.stack) + /DISCARD/ : { + *(.comment) } - - /* Memory region */ - memory : ORIGIN = 0x1000, LENGTH = 0x3F000; } diff --git a/makefile b/makefile index 99953fb..ca9d5a3 100644 --- a/makefile +++ b/makefile @@ -2,7 +2,7 @@ CC = gcc LD = ld CFLAGS = -m32 -ffreestanding -nostdlib -fno-builtin -fno-stack-protector -Wall -Wextra -Werror -Iinclude -LDFLAGS = -e _start +LDFLAGS = -arch x86_64 -e _start # Source files SRCS = Kernel16F.c display/display.c filesystem/filesystem.c disk_operations/disk.c memory_manager/mem_manager.c string/string.c process_manager/proc_man.c cli_interface/cli.c