Why is ld complaining?
Posted: Wed Nov 16, 2016 6:13 am
I've finally made a keyboard-usable kernel.
However, i686-elf-gcc linker mode complains about:
(prints is terminal_writestring renamed to prints, nothing else)
Here are the culprits that seem to be causing this:
BOOT.S:
TTY.C (It says it's in kernel.c but it's actually included by kernel.c but the linker doesn't care since GCC just adds the code anyway):
However, i686-elf-gcc linker mode complains about:
Code: Select all
boot.o: In function `_start':
(.text+0x6): undefined reference to `_init'
kernel.o: In function `prints':
kernel.c:(.text+0x15d): undefined reference to `strlen'
collect2.exe: error: ld returned 1 exit status
Here are the culprits that seem to be causing this:
BOOT.S:
Code: Select all
call _init /* call our global constructors, this is in _start, also this comment doesn't exist */
Code: Select all
void prints(const char* data) {
terminal_write(data, strlen(data)); /* complaining here on "strlen", i have a string.h included which is the same one from meaty skeleton without #INCLUDE cdefs*/
}