[coldfire-gnu-discuss] Override printf
Daniel Jacobowitz
dan at codesourcery.com
Fri Jul 11 15:43:54 UTC 2008
On Fri, Jul 11, 2008 at 11:23:46AM -0400, Corrin Meyer wrote:
> Adding '-fno-builtin-printf' seems to have solved my problems. The
> built binary is much smaller; on the order of what I expected. Since it
> seems that Newlib is not being linked in, I have to assume that my C
> library replacement is being placed in front of it even though I am not
> sure how to explicitly say so. Is there a way to guarantee that this
> will always be the case?
It's important not to think of Newlib as a single monolithic entity.
Your program will include only those bits of Newlib that you need, for
instance the __libc_init_array function.
You might be able to look at the map file to see which newlib objects
are being pulled in, and include just those yourself. This has
potential to break as you require more of the library, however.
--
Daniel Jacobowitz
CodeSourcery
More information about the coldfire-gnu-discuss
mailing list