.set MAGIC, 0x1badb002
.set FLAGS, (1<<0 | 1<<1)
.set CHECKSUM, -(MAGIC + FLAGS)
.multiboot
.long MAGIC
.long FLAGS
.long CHECKSUM
.text
.extern _kernelMain
.global loader
loader:
mov $kernel_stack, %esp
push %eax
push %ebx
call kernelMain
_stop:
cli
hlt
jmp _stop
.bss
.space 2*1024*1024
kernel_stack:
This is my code and it raises an error when ever I compile it says I have to add .section but when I do it raises a different error telling me to remove .section. How can I solve this?