PSP-toolchain and libc

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Xfennec
Posts: 2
Joined: Fri May 06, 2005 1:17 am
Contact:

PSP-toolchain and libc

Post by Xfennec »

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.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

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.
User avatar
alonetrio
Posts: 34
Joined: Sun May 15, 2005 12:10 am
Contact:

Post by alonetrio »

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
Post Reply