Building my own C library
John Carter
john.carter@tait.co.nz
Tue Sep 1 23:54:00 GMT 2009
On Wed, 2 Sep 2009, bd satish wrote:
> I was trying to compile my own Standard C Library (for ex, I want to
> use my version of malloc instead of the one included in libc ). What
> command line options should I use to compile & link this code with my
> test case ? The code is compiling fine (with option -nostdinc) but I
> think linking is my problem. For one, I noticed -nostdlib and
> -nodefaultlibs but these are giving errors.
You'll have to show the errors.
Some that I'd expect would relate to C language infrastructure
routines that are provided by libgcc which you have probably forgotten
to provide (or never heard of til now).
I hope you are aware their are many other ways to achieve similar
things...
I suspect this is a classic case of we can help do what you are trying
to do... but if you told us what you are trying to do... we could
advise a _much_ better and simpler solution.
ie. Writing your own Standard C library is almost _never_ what you
want to do.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand
More information about the Gcc-help
mailing list