CrazyLib
Posted: Tue Apr 01, 2003 9:34 pm
I've compiled this library into a *.o file. Can I link my kernel and other prgms to it? What i mean is this:
libc.o is the compiled library.
When i tried linking the kernel with the lib, the linker said that there were several bad references (as if it cannot find the functions in the libc.o).
What can I do to make it work? Someone told me to declare every lib function as extern, but it still didn't work... Solution please?
Thanks in advance...
Code: Select all
gxx -c kernel.c -ffreestanding -nostdlib -fno-builtin -fno-rtti -fno-exceptions
NASM -f coff kernel2.asm
ld -Ttext 0xFF800000 --oformat binary -o kernel.bin kernel2.o libc.o kernel.o
When i tried linking the kernel with the lib, the linker said that there were several bad references (as if it cannot find the functions in the libc.o).
What can I do to make it work? Someone told me to declare every lib function as extern, but it still didn't work... Solution please?
Thanks in advance...