In that case, before, it was touchy. Now I can't even get the first line of my OS's output onto the screen
It freezes at the GRUB menu.
I will post the makefile and see if anyone can see what's wrong.
Code: Select all
FILES:=
PROGRAM:=occ
LIBRARIES:=libstd.a
CFLAGS:= -m32 -c -nostdinc -nostdlib -fno-stack-protector -Iincludes -Iincludes/stdlib
CC:=@gcc
ASFLAGS:= -felf
AS:=@nasm
OSPROJDIRS := main stdlib
OSCFILES := $(shell find $(OSPROJDIRS) -mindepth 1 -maxdepth 3 -name "*.c")
OSASMFILES:= $(shell find $(OSPROJDIRS) -mindepth 1 -maxdepth 3 -name "*.s")
OSHDRFILES := $(shell find $(OSPROJDIRS) -mindepth 1 -maxdepth 3 -name "*.h")
OSCOBJS:=$(patsubst %.c, %.o, $(OSCFILES))
OSASMOBJS:=$(patsubst %.s, %.o, $(OSASMFILES))
OBJFILES := $(OSASMOBJS) $(OSCOBJS)
all: kernel32.elf
kernel32.elf: $(OBJFILES)
@echo $(OBJFILES)
@ld -o $@ $(OBJFILES) -Tlink.ld -melf_i386
@cp kernel32.elf /media/OSDEV_15/kernel32.elf
@rm $(OBJFILES) kernel32.elf
umount /media/OSDEV_15
I also had a piece of code reserving 16384 dword's in the text section of start.s.
It was getting past the GRUB boot menu at that point, but not far.
also of use may be my linker script.
Code: Select all
ENTRY(start)
SECTIONS
{
.text 0x100000 :
{
code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .; __data = .;
*(.data)
*(.rodata)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}