Code: Select all
void pic_handler()
{
asm(".globl pic_handler\n"
"pic_handler:\n"
"cli\n"
"pusha\n"
"pushl %ds\n"
"pushl %es\n"
"pushl %fs\n"
"pushl %gs\n"
"movl %esp, %eax\n"
"pushl %eax\n"
"call exec_irq\n"
"popl %eax\n"
"mov %eax, %esp\n"
"popl %gs\n"
"popl %fs\n"
"popl %es\n"
"popl %ds\n"
"popa\n"
"sti\n"
"iret\n");
}
Code: Select all
ccache gcc -Wall -O -floop-optimize2 -fno-builtin -nostdlib -nostartfiles -nodefaultlibs -nostdinc -I include -ffreestanding -fno-stack-protector -c kernel/pic.c -o kernel/pic.o
/tmp/ccUu4Ddw.s: Assembler messages:
/tmp/ccUu4Ddw.s:10: Error: symbol `pic_handler' is already defined
make: *** [kernel/pic.o] Error 1
PS: Is the code correct or I must change something?