mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
remove idt & idt_reg
"idt.h" included by idt.c and kernel.c, which will cause link failed. so move the definition of idt to idt.c to avoid the failure below. ld: cpu/idt.o:(.bss+0x0): multiple definition of `idt'; kernel/kernel.o:(.bss+0x0): first defined here ld: cpu/idt.o:(.bss+0x800): multiple definition of `idt_reg'; kernel/kernel.o:(.bss+0x800): first defined here ld: cpu/isr.o:(.bss+0x0): multiple definition of `idt'; kernel/kernel.o:(.bss+0x0): first defined here ld: cpu/isr.o:(.bss+0x800): multiple definition of `idt_reg'; kernel/kernel.o:(.bss+0x800): first defined here
This commit is contained in:
parent
7aff64740e
commit
d24ea64b7b
@ -27,10 +27,6 @@ typedef struct {
|
||||
u32 base;
|
||||
} __attribute__((packed)) idt_register_t;
|
||||
|
||||
#define IDT_ENTRIES 256
|
||||
idt_gate_t idt[IDT_ENTRIES];
|
||||
idt_register_t idt_reg;
|
||||
|
||||
|
||||
/* Functions implemented in idt.c */
|
||||
void set_idt_gate(int n, u32 handler);
|
||||
|
Loading…
Reference in New Issue
Block a user