I wrote GDT/IDT table loader for my own kernel, and I linked it with ld. But when I generate the binary, the error has appeared.ld.exe: desc_tablesc.o:desc_tables.c:(.text+0x1e7): undefined reference to `memcpy'
and here's my code:
#include "desc_tables.h"#include "common.h"#include <stdint.h>static void init_idt(){ __idt_ptr.limit = sizeof(idt_entry) * 256 -1; __idt_ptr.base = (u32int)&idt_entries; memset(&idt_entries, 0, sizeof(idt_entry)*256); idt_set_gate( 0, (u32int)isr0 , 0x08, 0x8E); . . . idt_set_gate( 31, (u32int)isr31, 0x08, 0x8E); idt_flush((u32int)&__idt_ptr);}```