Code: Select all
Symbol table '.symtab' contains 10 entries:
...
8: 00000000 0 FUNC GLOBAL DEFAULT 1 _start
boot.s:
Code: Select all
.section .bootstrap_stack, "w", @nobits
stack_bottom:
.skip 16384 # 16 KiB
stack_top:
.section .text
.global _start
.type _start, @function
_start:
movl $stack_top, %esp
call kernel_main #kernel_main is in the kernel.c file
.loop:
jmp .loop
Code: Select all
ENTRY(_start);
SECTIONS
{
. = 0x7C00;
.text : {*(.text)}
.signature : AT(0x7DFE)
{
SHORT(0xAA55);
}
/DISCARD/ : {*(.eh_frame)}
}
Code: Select all
$(RELEASE)/kernel.o: $(SOURCE)/kernel.c
i686-elf-gcc -c -ffreestanding $< -o $@ -Wall -Wextra
$(RELEASE)/boot.o: $(SOURCE)/boot.s
i686-elf-as $< -o $@
$(RELEASE)/kernel.bin: $(RELEASE)/kernel.o $(RELEASE)/boot.o
i686-elf-gcc -T boot.ld -o $@ -ffreestanding -nostdlib $< -lgcc
mycityofsky