Skip to content

Conversation

@purplewall1206
Copy link

"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

 "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
u32 base;
} __attribute__((packed)) idt_register_t;

#define IDT_ENTRIES 256

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain change of moving deleted code into c file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see your changes spreaded into multiple pull requests (https://github.com/cfenollosa/os-tutorial/pull/181/files).

@PrattaySarkar PrattaySarkar mentioned this pull request Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants