OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 1:04 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: What is the replacement for the stdlib I can use in my OS?
PostPosted: Sat Dec 21, 2019 5:39 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 296
I saw the article on the wiki, but have not yet tried to implement anything of what is written there.
My question is: can I use the cross compiler library? If so, how do I replace / find analogues of some header files, such as stdlib.h?
Which of the listed libraries will be more suitable and will they work on my kernel.


Top
 Profile  
 
 Post subject: Re: What is the replacement for the stdlib I can use in my O
PostPosted: Sun Dec 22, 2019 12:35 am 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1593
You are working on a kernel. There is no library. There is only the kernel. OK, in GCC, there is also libgcc, but otherwise, there is no library. And libgcc only contains small utility functions, references to which are emitted by GCC automatically. You want a memcpy() function? Write it yourself, it is not hard. For GCC, you will have to define memcpy(), memmove(), memcmp(), and memset() yourself. Otherwise you are entirely free to write whatever functions you desire.

Those libraries come into play once you get the ball rolling on userspace. That might be a while off for you.

_________________
Carpe diem!


Top
 Profile  
 
 Post subject: Re: What is the replacement for the stdlib I can use in my O
PostPosted: Sun Dec 22, 2019 6:42 am 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 296
nullplan wrote:
You are working on a kernel. There is no library. There is only the kernel. OK, in GCC, there is also libgcc, but otherwise, there is no library. And libgcc only contains small utility functions, references to which are emitted by GCC automatically. You want a memcpy() function? Write it yourself, it is not hard. For GCC, you will have to define memcpy(), memmove(), memcmp(), and memset() yourself. Otherwise you are entirely free to write whatever functions you desire.

Those libraries come into play once you get the ball rolling on userspace. That might be a while off for you.


Understand, thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 172 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group