forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSP-toolchain and libc

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Xfennec



Joined: 06 May 2005
Posts: 2

PostPosted: Thu Jun 23, 2005 7:24 pm    Post subject: PSP-toolchain and libc Reply with quote

Hi,
When linking with "-lc", it provides me things like "strlen", but "malloc" failed (../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to « sbrk »).

What part of LIBC is provided by toolchain ? Is there any alternative available ?
If someone started a LIBC complement, I would like to help this project, since I think we now need a full ANSI-C devkit.


Last edited by Xfennec on Thu Jun 23, 2005 7:57 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Thu Jun 23, 2005 7:40 pm    Post subject: Reply with quote

The full standard C library provided by newlib ships with psptoolchain. There are a few platform-dependent functions that newlib depends on and sbrk() is one of them. This will be fixed in the upcoming release of pspsdk.

Thanks for the offer though.
Back to top
View user's profile Send private message
alonetrio



Joined: 15 May 2005
Posts: 34

PostPosted: Fri Jun 24, 2005 6:52 am    Post subject: Reply with quote

here is a little malloc replacement :

http://www.wab.com/tools/malloc.c

be sure to rename function like malloc_psp or free_psp to avoid redefinement.

ALoneTrio
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group