Using Linux 0.1 Code, undefined reference

Programming, for all ages and all languages.
Post Reply
Bobalandi
Member
Member
Posts: 107
Joined: Mon Dec 03, 2007 7:26 am
Location: Near Boston, MA
Contact:

Using Linux 0.1 Code, undefined reference

Post 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.?
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: Using Linux 0.1 Code, undefined reference

Post by piranha »

Do you have a strlen function :wink: ?

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Bobalandi
Member
Member
Posts: 107
Joined: Mon Dec 03, 2007 7:26 am
Location: Near Boston, MA
Contact:

Re: Using Linux 0.1 Code, undefined reference

Post by Bobalandi »

yes sir, it's included in the string.h that I ported. :?
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Using Linux 0.1 Code, undefined reference

Post by AJ »

Have you ported the binary as well as the header?

Cheers,
Adam
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: Using Linux 0.1 Code, undefined reference

Post 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
Bobalandi
Member
Member
Posts: 107
Joined: Mon Dec 03, 2007 7:26 am
Location: Near Boston, MA
Contact:

Re: Using Linux 0.1 Code, undefined reference

Post by Bobalandi »

yeah, I think I'll just try to implement my own in C :\
NULL
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Re: Using Linux 0.1 Code, undefined reference

Post by lukem95 »

its not particularly hard to do, google "strlen implementation" and you'll find loads.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
Post Reply