Linker error
Posted: Sat Dec 15, 2018 3:00 pm
Hello, here bothering again with stupid questions.
I've been trying to add an IDT to my OS (real mode). I managed to create the PIC successfully, now I try to add the IDT but when I compile I get this error from the linker:
boot.o: In function `irq0':
kernel/irq.inc:56: undefined reference to `irq0_handler'
boot.o: In function `irq1':
kernel/irq.inc:62: undefined reference to `irq1_handler'
boot.o: In function `irq2':
kernel/irq.inc:68: undefined reference to `irq2_handler'
boot.o: In function `irq3':
kernel/irq.inc:74: undefined reference to `irq3_handler'
boot.o: In function `irq4':
kernel/irq.inc:80: undefined reference to `irq4_handler'
boot.o: In function `irq5':
kernel/irq.inc:86: undefined reference to `irq5_handler'
boot.o: In function `irq6':
kernel/irq.inc:92: undefined reference to `irq6_handler'
boot.o: In function `irq7':
kernel/irq.inc:98: undefined reference to `irq7_handler'
boot.o: In function `irq8':
kernel/irq.inc:104: undefined reference to `irq8_handler'
boot.o: In function `irq9':
kernel/irq.inc:110: undefined reference to `irq9_handler'
boot.o: In function `irq10':
kernel/irq.inc:116: undefined reference to `irq10_handler'
boot.o: In function `irq11':
kernel/irq.inc:122: undefined reference to `irq11_handler'
boot.o: In function `irq12':
kernel/irq.inc:128: undefined reference to `irq12_handler'
boot.o: In function `irq13':
kernel/irq.inc:134: undefined reference to `irq13_handler'
boot.o: In function `irq14':
kernel/irq.inc:140: undefined reference to `irq14_handler'
boot.o: In function `irq15':
kernel/irq.inc:146: undefined reference to `irq15_handler'
kmain.o: In function `kernelmain':
/mnt/c/Users/nicol/Desktop/ckernel/kmain.c:26: undefined reference to `idt_init'
Here's the entire source of my OS:
https://transfer.sh/tjoLh/ckernel.tar.gz
I need to make my own interrupts, so I can my OS MS-DOS compatible.
I borrowed the PIC and IDT code from OSDev btw
I've been trying to add an IDT to my OS (real mode). I managed to create the PIC successfully, now I try to add the IDT but when I compile I get this error from the linker:
boot.o: In function `irq0':
kernel/irq.inc:56: undefined reference to `irq0_handler'
boot.o: In function `irq1':
kernel/irq.inc:62: undefined reference to `irq1_handler'
boot.o: In function `irq2':
kernel/irq.inc:68: undefined reference to `irq2_handler'
boot.o: In function `irq3':
kernel/irq.inc:74: undefined reference to `irq3_handler'
boot.o: In function `irq4':
kernel/irq.inc:80: undefined reference to `irq4_handler'
boot.o: In function `irq5':
kernel/irq.inc:86: undefined reference to `irq5_handler'
boot.o: In function `irq6':
kernel/irq.inc:92: undefined reference to `irq6_handler'
boot.o: In function `irq7':
kernel/irq.inc:98: undefined reference to `irq7_handler'
boot.o: In function `irq8':
kernel/irq.inc:104: undefined reference to `irq8_handler'
boot.o: In function `irq9':
kernel/irq.inc:110: undefined reference to `irq9_handler'
boot.o: In function `irq10':
kernel/irq.inc:116: undefined reference to `irq10_handler'
boot.o: In function `irq11':
kernel/irq.inc:122: undefined reference to `irq11_handler'
boot.o: In function `irq12':
kernel/irq.inc:128: undefined reference to `irq12_handler'
boot.o: In function `irq13':
kernel/irq.inc:134: undefined reference to `irq13_handler'
boot.o: In function `irq14':
kernel/irq.inc:140: undefined reference to `irq14_handler'
boot.o: In function `irq15':
kernel/irq.inc:146: undefined reference to `irq15_handler'
kmain.o: In function `kernelmain':
/mnt/c/Users/nicol/Desktop/ckernel/kmain.c:26: undefined reference to `idt_init'
Here's the entire source of my OS:
https://transfer.sh/tjoLh/ckernel.tar.gz
I need to make my own interrupts, so I can my OS MS-DOS compatible.
I borrowed the PIC and IDT code from OSDev btw