Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldfire-gnu-discuss] Override printf


  • To: Corrin Meyer <Corrin.Meyer@xxxxxxxxxxxxxxx>
  • Subject: Re: [coldfire-gnu-discuss] Override printf
  • From: Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
  • Date: Fri, 11 Jul 2008 11:43:54 -0400

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