Page 1 of 1
Using Linux 0.1 Code, undefined reference
Posted: Mon Jun 30, 2008 7:40 pm
by Bobalandi
I was trying to get a working printf to use Brynet-Inc's cpuid code in my kernel, so I decided to try to port Linus Torvald's Linux 0.1 vsprintf code to my kernel, but when I compile and link it to my kernel, I keep getting the following error:
Code: Select all
vsprintf.o: In function `vsprintf':
vsprintf.c:(.text+0x462): undefined reference to `strlen'
What's going on.?
Re: Using Linux 0.1 Code, undefined reference
Posted: Mon Jun 30, 2008 7:55 pm
by piranha
Do you have a strlen function
?
-JL
Re: Using Linux 0.1 Code, undefined reference
Posted: Tue Jul 01, 2008 6:57 am
by Bobalandi
yes sir, it's included in the string.h that I ported.
Re: Using Linux 0.1 Code, undefined reference
Posted: Tue Jul 01, 2008 8:38 am
by AJ
Have you ported the binary as well as the header?
Cheers,
Adam
Re: Using Linux 0.1 Code, undefined reference
Posted: Tue Jul 01, 2008 11:25 am
by DeletedAccount
Hey ! ,
Linux kernel 0.1 has a hacked up string library written in x86 asm.I prefer a simpler C implementation . You may need to make some changes . The linux kernel 0.1 has a bug that makes it difficult to work with some bioses . Also make sure that you clear the NT flag , this will save lots of trouble later on .
Regards
Sandeep Mathew
Re: Using Linux 0.1 Code, undefined reference
Posted: Tue Jul 01, 2008 4:44 pm
by Bobalandi
yeah, I think I'll just try to implement my own in C :\
Re: Using Linux 0.1 Code, undefined reference
Posted: Wed Jul 02, 2008 4:26 am
by lukem95
its not particularly hard to do, google "strlen implementation" and you'll find loads.